diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | lib/rdoc/generators/html_generator.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/parsers/parse_rb.rb | 12 |
3 files changed, 21 insertions, 3 deletions
@@ -1,3 +1,13 @@ +Tue Feb 24 06:08:47 2004 Dave Thomas <dave@pragprog.com> + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_constant): + Start collecting text of constant values earlier: was missing + values in output if there was no space after '=' + +Tue Feb 24 06:08:25 2004 Dave Thomas <dave@pragprog.com> + + * lib/rdoc/generators/html_generator.rb: Escape contant values. + Tue Feb 24 03:45:06 2004 GOTOU Yuuzou <gotoyuzo@notwork.org> * ext/openssl/ossl_config.c (ossl_config_each): add new method diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb index b7d3961b45..a6a38f6a5c 100644 --- a/lib/rdoc/generators/html_generator.rb +++ b/lib/rdoc/generators/html_generator.rb @@ -348,7 +348,7 @@ module Generators @context.constants.map do |co| res = { 'name' => co.name, - 'value' => co.value + 'value' => CGI.escapeHTML(co.value) } res['desc'] = markup(co.comment, true) if co.comment && !co.comment.empty? res diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb index 413167a39a..fd57ee2e4b 100644 --- a/lib/rdoc/parsers/parse_rb.rb +++ b/lib/rdoc/parsers/parse_rb.rb @@ -1510,6 +1510,10 @@ module RDoc read end + def peek_read + @read.join('') + end + NORMAL = "::" SINGLE = "<<" @@ -1814,6 +1818,10 @@ module RDoc return end + + nest = 0 + get_tkread + tk = get_tk if tk.kind_of? TkGT unget_tk(tk) @@ -1821,11 +1829,10 @@ module RDoc return end - nest = 0 - get_tkread loop do puts("Param: #{tk}, #{@scanner.continue} " + "#{@scanner.lex_state} #{nest}") if $DEBUG + case tk when TkSEMICOLON break @@ -1846,6 +1853,7 @@ module RDoc end tk = get_tk end + res = get_tkread.tr("\n", " ").strip res = "" if res == ";" con = Constant.new(name, res, comment) |