Sync with latest maruku.
This commit is contained in:
parent
144540a761
commit
4ae46b32d8
2 changed files with 12 additions and 7 deletions
|
@ -197,9 +197,13 @@ module MaRuKu; module In; module Markdown; module SpanLevelParser
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
when ?{ # extension
|
when ?{ # extension
|
||||||
|
if [?#, ?., ?:].include? src.next_char
|
||||||
src.ignore_char # {
|
src.ignore_char # {
|
||||||
interpret_extension(src, con, [?}])
|
interpret_extension(src, con, [?}])
|
||||||
src.ignore_char # }
|
src.ignore_char # }
|
||||||
|
else
|
||||||
|
con.push_char src.shift_char
|
||||||
|
end
|
||||||
when nil
|
when nil
|
||||||
maruku_error( ("Unclosed span (waiting for %s"+
|
maruku_error( ("Unclosed span (waiting for %s"+
|
||||||
"#{exit_on_strings.inspect})") % [
|
"#{exit_on_strings.inspect})") % [
|
||||||
|
@ -455,12 +459,13 @@ module MaRuKu; module In; module Markdown; module SpanLevelParser
|
||||||
|
|
||||||
consumed = 0
|
consumed = 0
|
||||||
while true
|
while true
|
||||||
h.eat_this next_stuff[consumed].chr; consumed += 1
|
|
||||||
break if h.is_finished?
|
|
||||||
|
|
||||||
if consumed >= next_stuff.size
|
if consumed >= next_stuff.size
|
||||||
maruku_error "Malformed HTML starting at #{next_stuff.inspect}", src, con
|
maruku_error "Malformed HTML starting at #{next_stuff.inspect}", src, con
|
||||||
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
|
h.eat_this next_stuff[consumed].chr; consumed += 1
|
||||||
|
break if h.is_finished?
|
||||||
end
|
end
|
||||||
src.ignore_chars(consumed)
|
src.ignore_chars(consumed)
|
||||||
con.push_element md_html(h.stuff_you_read)
|
con.push_element md_html(h.stuff_you_read)
|
||||||
|
|
|
@ -76,7 +76,7 @@ module MaRuKu; module Strings
|
||||||
# $1 = id $2 = attribute list
|
# $1 = id $2 = attribute list
|
||||||
AttributeDefinitionList = /^\s{0,3}\{([\w\d\s]+)\}:\s*(.*)\s*$/
|
AttributeDefinitionList = /^\s{0,3}\{([\w\d\s]+)\}:\s*(.*)\s*$/
|
||||||
#
|
#
|
||||||
InlineAttributeList = /^\s{0,3}\{(.*)\}\s*$/
|
InlineAttributeList = /^\s{0,3}\{([:#\.].*)\}\s*$/
|
||||||
# Example:
|
# Example:
|
||||||
# ^:blah blah
|
# ^:blah blah
|
||||||
# ^: blah blah
|
# ^: blah blah
|
||||||
|
|
Loading…
Add table
Reference in a new issue