Markdown: numero inicial em listas enumeradas

This commit is contained in:
2009-09-07 12:05:43 -03:00
parent c75c854a5d
commit 0d00ee07db
2 changed files with 7 additions and 5 deletions

View File

@@ -568,10 +568,12 @@ class BlueCloth < String
@log.debug " Found list %p" % list
bullet = $1
list_type = (ListMarkerUl.match(bullet) ? "ul" : "ol")
list_start = (/([0-9]+)\./.match(bullet) ? " start='#{$1}'" : "")
list.gsub!( /\n{2,}/, "\n\n\n" )
%{<%s>\n%s</%s>\n} % [
%{<%s%s>\n%s</%s>\n} % [
list_type,
list_start,
transform_list_items( list, rs ),
list_type,
]