diff --git a/vendor/plugins/maruku/lib/maruku/input/parse_block.rb b/vendor/plugins/maruku/lib/maruku/input/parse_block.rb index e29c8488..e08cb708 100644 --- a/vendor/plugins/maruku/lib/maruku/input/parse_block.rb +++ b/vendor/plugins/maruku/lib/maruku/input/parse_block.rb @@ -251,6 +251,7 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser "I see that #{h.rest.inspect} is left after the raw HTML.", src end raw_html = h.stuff_you_read + return md_html(raw_html) end @@ -283,7 +284,8 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser item_type = src.cur_line.md_type first = src.shift_line - indentation = spaces_before_first_char(first) + indentation, ial = spaces_before_first_char(first) + al = read_attribute_list(CharSource.new(ial,src), context=nil, break_on=[nil]) if ial break_list = [:ulist, :olist, :ial] # Ugly things going on inside `read_indented_content` lines, want_my_paragraph = @@ -300,7 +302,7 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser children = parse_blocks(src2) with_par = want_my_paragraph || (children.size>1) - return md_li(children, with_par) + return md_li(children, with_par, al) end def read_abbreviation(src) diff --git a/vendor/plugins/maruku/lib/maruku/string_utils.rb b/vendor/plugins/maruku/lib/maruku/string_utils.rb index e58f715a..831666b3 100644 --- a/vendor/plugins/maruku/lib/maruku/string_utils.rb +++ b/vendor/plugins/maruku/lib/maruku/string_utils.rb @@ -113,9 +113,14 @@ module MaRuKu; module Strings while s[i,1] =~ /\s/; i+=1 end # skip indicator (+, -, *) i+=1 + # skip whitespace + while s[i,1] =~ /\s/; i+=1 end + # find an IAL + ial = s[i,s.length - i][/^\{(.*?)\}/] + i+= ial.length if ial # skip optional whitespace while s[i,1] =~ /\s/; i+=1 end - return i + return [i, ial] when :olist i=0; # skip whitespace @@ -124,12 +129,17 @@ module MaRuKu; module Strings while s[i,1] =~ /\d/; i+=1 end # skip dot i+=1 + # skip optional whitespace + while s[i,1] =~ /\s/; i+=1 end + # find an IAL + ial = s[i,s.length - i][/^\{(.*?)\}/] + i+= ial.length if ial # skip whitespace while s[i,1] =~ /\s/; i+=1 end - return i + return [i, ial] else tell_user "BUG (my bad): '#{s}' is not a list" - 0 + [0, nil] end end