Fix constant value extraction. Escape HTML in constant values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2d0e62faf1
commit
74d704c263
10
ChangeLog
10
ChangeLog
@ -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>
|
Tue Feb 24 03:45:06 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
* ext/openssl/ossl_config.c (ossl_config_each): add new method
|
* ext/openssl/ossl_config.c (ossl_config_each): add new method
|
||||||
|
@ -348,7 +348,7 @@ module Generators
|
|||||||
@context.constants.map do |co|
|
@context.constants.map do |co|
|
||||||
res = {
|
res = {
|
||||||
'name' => co.name,
|
'name' => co.name,
|
||||||
'value' => co.value
|
'value' => CGI.escapeHTML(co.value)
|
||||||
}
|
}
|
||||||
res['desc'] = markup(co.comment, true) if co.comment && !co.comment.empty?
|
res['desc'] = markup(co.comment, true) if co.comment && !co.comment.empty?
|
||||||
res
|
res
|
||||||
|
@ -1510,6 +1510,10 @@ module RDoc
|
|||||||
read
|
read
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def peek_read
|
||||||
|
@read.join('')
|
||||||
|
end
|
||||||
|
|
||||||
NORMAL = "::"
|
NORMAL = "::"
|
||||||
SINGLE = "<<"
|
SINGLE = "<<"
|
||||||
|
|
||||||
@ -1814,6 +1818,10 @@ module RDoc
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
nest = 0
|
||||||
|
get_tkread
|
||||||
|
|
||||||
tk = get_tk
|
tk = get_tk
|
||||||
if tk.kind_of? TkGT
|
if tk.kind_of? TkGT
|
||||||
unget_tk(tk)
|
unget_tk(tk)
|
||||||
@ -1821,11 +1829,10 @@ module RDoc
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
nest = 0
|
|
||||||
get_tkread
|
|
||||||
loop do
|
loop do
|
||||||
puts("Param: #{tk}, #{@scanner.continue} " +
|
puts("Param: #{tk}, #{@scanner.continue} " +
|
||||||
"#{@scanner.lex_state} #{nest}") if $DEBUG
|
"#{@scanner.lex_state} #{nest}") if $DEBUG
|
||||||
|
|
||||||
case tk
|
case tk
|
||||||
when TkSEMICOLON
|
when TkSEMICOLON
|
||||||
break
|
break
|
||||||
@ -1846,6 +1853,7 @@ module RDoc
|
|||||||
end
|
end
|
||||||
tk = get_tk
|
tk = get_tk
|
||||||
end
|
end
|
||||||
|
|
||||||
res = get_tkread.tr("\n", " ").strip
|
res = get_tkread.tr("\n", " ").strip
|
||||||
res = "" if res == ";"
|
res = "" if res == ";"
|
||||||
con = Constant.new(name, res, comment)
|
con = Constant.new(name, res, comment)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user