[#3358] Fwd: fastcgi & continuations (Re: Idea: Webshare) — Patrick May <patrick@...>
Hello,
8 messages
2004/09/09
[#3359] Re: Fwd: fastcgi & continuations (Re: Idea: Webshare)
— Eric Hodel <drbrain@...7.net>
2004/09/09
Patrick May (patrick@hexane.org) wrote:
[#3419] Valgrind analysis of [BUG] unknown node type 0 — Andrew Walrond <andrew@...>
Hello list,
19 messages
2004/09/17
[#3422] Re: Valgrind analysis of [BUG] unknown node type 0
— ts <decoux@...>
2004/09/17
>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:
[#3423] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
On Friday 17 Sep 2004 12:01, ts wrote:
[#3424] Re: Valgrind analysis of [BUG] unknown node type 0
— ts <decoux@...>
2004/09/17
>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:
[#3425] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
On Friday 17 Sep 2004 12:37, ts wrote:
[#3426] Re: Valgrind analysis of [BUG] unknown node type 0
— ts <decoux@...>
2004/09/17
>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:
[#3428] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
On Friday 17 Sep 2004 13:05, ts wrote:
[#3429] Re: Valgrind analysis of [BUG] unknown node type 0
— ts <decoux@...>
2004/09/17
>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:
[#3430] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
On Friday 17 Sep 2004 13:30, ts wrote:
[#3431] Re: Valgrind analysis of [BUG] unknown node type 0
— ts <decoux@...>
2004/09/17
>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:
[#3432] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
On Friday 17 Sep 2004 13:50, ts wrote:
[#3433] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
There is a minor flaw in my analysis toward the end; ignore previous email
[#3434] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
On Friday 17 Sep 2004 13:50, ts wrote:
[#3437] Re: Valgrind analysis of [BUG] unknown node type 0
— Yukihiro Matsumoto <matz@...>
2004/09/17
Hi,
RDoc Formatter Simple Mode
From:
Eric Hodel <drbrain@...7.net>
Date:
2004-09-11 05:38:22 UTC
List:
ruby-core #3379
For rbot's ri module I needed a more compact ri format than plain to avoid flooding the bot off the server. I added a 'simple' format that strips out extra newlines and reduces lines to just their labels. When combined with a really large line width, the formatter is perfect for use in an IRC bot. -- Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04
Attachments (1)
rdoc_simple_formatter.patch
(2.23 KB, text/x-diff)
Index: ri_formatter.rb
===================================================================
RCS file: /src/ruby/lib/rdoc/ri/ri_formatter.rb,v
retrieving revision 1.11
diff -u -9 -p -r1.11 ri_formatter.rb
--- ri_formatter.rb 24 Mar 2004 19:17:13 -0000 1.11
+++ ri_formatter.rb 11 Sep 2004 05:17:36 -0000
@@ -1,22 +1,23 @@
module RI
class TextFormatter
def TextFormatter.list
- "plain, html, bs, ansi"
+ "plain, html, bs, ansi, simple"
end
def TextFormatter.for(name)
case name
- when /plain/i then TextFormatter
- when /html/i then HtmlFormatter
- when /bs/i then OverstrikeFormatter
- when /ansi/i then AnsiFormatter
+ when /plain/i then TextFormatter
+ when /html/i then HtmlFormatter
+ when /bs/i then OverstrikeFormatter
+ when /ansi/i then AnsiFormatter
+ when /simple/i then SimpleFormatter
else nil
end
end
attr_reader :indent
def initialize(options, indent)
@options = options
@width = options.width
@@ -585,15 +586,57 @@ module RI
print("</#{code}>")
end
def escape(str)
str.
gsub(/&/n, '&').
gsub(/\"/n, '"').
gsub(/>/n, '>').
gsub(/</n, '<')
+ end
+
+ end
+
+ ##################################################
+
+ # This formatter reduces extra lines for a simpler output.
+ # It improves way output looks for tools like IRC bots.
+
+ class SimpleFormatter < TextFormatter
+
+ ######################################################################
+
+ # No extra blank lines
+
+ def blankline
+ end
+
+ ######################################################################
+
+ # Display labels only, no lines
+
+ def draw_line(label=nil)
+ unless label.nil? then
+ bold_print(label)
+ puts
+ end
+ end
+
+ ######################################################################
+
+ # Place heading level indicators inline with heading.
+
+ def display_heading(text, level, indent)
+ case level
+ when 1
+ puts "= " + text.upcase
+ when 2
+ puts "-- " + text
+ else
+ print indent, text, "\n"
+ end
end
end
end