Fix Ordered Lists

Fix a regression in Maruku.
(Reported by Andrew Stacey.)
This commit is contained in:
Jacques Distler 2011-06-09 08:30:23 -05:00
parent 0ae83c3560
commit 79a966f71f
2 changed files with 9 additions and 1 deletions

View file

@ -244,6 +244,14 @@ END_THM
end
def test_sick_lists
assert_markup_parsed_as(
"<ul>\n<li>item 1 19.</li>\n</ul>",
"* item 1\n19.\n")
end
def test_have_latest_itex2mml
assert_markup_parsed_as(

View file

@ -54,7 +54,7 @@ module MaRuKu; module Strings
#return :ulist if l =~ /^[ ]{0,3}([\*\-\+])\s+.*\w+/
#return :olist if l =~ /^[ ]{0,3}\d+\..*\w+/
return :ulist if l =~ /^[ ]{0,1}([\*\-\+])\s+.*/
return :olist if l =~ /^[ ]{0,1}\d+\..*/
return :olist if l =~ /^[ ]{0,1}\d+\.\s+.*/
return :header1 if l =~ /^(=)+/
return :header2 if l =~ /^([-\s])+$/
return :header3 if l =~ /^(#)+\s*\S+/