mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix constant value extraction. Escape HTML in constant values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f84f600ffa
commit
261d63ae46
3 changed files with 21 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue