From 79a966f71f8aa7021dc0970c38655bf336b4e1c9 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Thu, 9 Jun 2011 08:30:23 -0500 Subject: [PATCH] Fix Ordered Lists Fix a regression in Maruku. (Reported by Andrew Stacey.) --- test/unit/page_renderer_test.rb | 8 ++++++++ vendor/plugins/maruku/lib/maruku/input/type_detection.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/unit/page_renderer_test.rb b/test/unit/page_renderer_test.rb index c0f94774..60a48848 100644 --- a/test/unit/page_renderer_test.rb +++ b/test/unit/page_renderer_test.rb @@ -244,6 +244,14 @@ END_THM end + def test_sick_lists + + assert_markup_parsed_as( + "", + "* item 1\n19.\n") + + end + def test_have_latest_itex2mml assert_markup_parsed_as( diff --git a/vendor/plugins/maruku/lib/maruku/input/type_detection.rb b/vendor/plugins/maruku/lib/maruku/input/type_detection.rb index ba086f2f..9b1ad453 100644 --- a/vendor/plugins/maruku/lib/maruku/input/type_detection.rb +++ b/vendor/plugins/maruku/lib/maruku/input/type_detection.rb @@ -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+/