Sync with latest Maruku.

This commit is contained in:
Jacques Distler 2007-02-20 10:04:51 -06:00
parent 88c6f27e14
commit d1923e6387

View file

@ -152,8 +152,13 @@ module MaRuKu; module In; module Markdown; module SpanLevelParser
con.push_char src.shift_char
end
when ?&
# named references
if m = src.read_regexp(/\&([\w\d]+);/)
con.push_element md_entity(m[1])
# numeric
elsif m = src.read_regexp(/\&\#(x)?([\w\d]+);/)
num = m[1] ? m[2].hex : m[2].to_i
con.push_element md_entity(num)
else
con.push_char src.shift_char
end