Markdown: numero inicial em listas enumeradas

master
Alinson S. Xavier 16 years ago
parent c75c854a5d
commit 0d00ee07db

@ -65,13 +65,13 @@ Rails::Initializer.run do |config|
config.action_view.sanitized_allowed_tags = %W(p h1 h2 h3 h4 h5 h6 dl dt ol
ul li address blockquote del div hr ins pre a abbr acronym dfn em strong
code samp kbd var b i big small tt span br bdo cite del ins q sub sup img
map table tr td th colgroup col caption thead tbody tfoot)
code samp kbd var b i big small tt span br bdo cite del ins q sub sup
img map table tr td th colgroup col caption thead tbody tfoot)
config.action_view.sanitized_allowed_attributes = %W(align alt border
cellpadding cellspacing cols colspan coords height href longdesc name
noresize nowrap rel rows rowspan rules scope shape size span src style
summary title type usemap valign width)
noresize nowrap rel rows rowspan rules scope shape size span src start
style summary title type usemap valign width)
config.gem "dr_nic_magic_models"
config.gem "bluecloth"

@ -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,
]