Markdown: numero inicial em listas enumeradas
This commit is contained in:
@@ -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
|
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
|
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
|
code samp kbd var b i big small tt span br bdo cite del ins q sub sup
|
||||||
map table tr td th colgroup col caption thead tbody tfoot)
|
img map table tr td th colgroup col caption thead tbody tfoot)
|
||||||
|
|
||||||
config.action_view.sanitized_allowed_attributes = %W(align alt border
|
config.action_view.sanitized_allowed_attributes = %W(align alt border
|
||||||
cellpadding cellspacing cols colspan coords height href longdesc name
|
cellpadding cellspacing cols colspan coords height href longdesc name
|
||||||
noresize nowrap rel rows rowspan rules scope shape size span src style
|
noresize nowrap rel rows rowspan rules scope shape size span src start
|
||||||
summary title type usemap valign width)
|
style summary title type usemap valign width)
|
||||||
|
|
||||||
config.gem "dr_nic_magic_models"
|
config.gem "dr_nic_magic_models"
|
||||||
config.gem "bluecloth"
|
config.gem "bluecloth"
|
||||||
|
|||||||
4
vendor/gems/bluecloth-1.0.0/lib/bluecloth.rb
vendored
4
vendor/gems/bluecloth-1.0.0/lib/bluecloth.rb
vendored
@@ -568,10 +568,12 @@ class BlueCloth < String
|
|||||||
@log.debug " Found list %p" % list
|
@log.debug " Found list %p" % list
|
||||||
bullet = $1
|
bullet = $1
|
||||||
list_type = (ListMarkerUl.match(bullet) ? "ul" : "ol")
|
list_type = (ListMarkerUl.match(bullet) ? "ul" : "ol")
|
||||||
|
list_start = (/([0-9]+)\./.match(bullet) ? " start='#{$1}'" : "")
|
||||||
list.gsub!( /\n{2,}/, "\n\n\n" )
|
list.gsub!( /\n{2,}/, "\n\n\n" )
|
||||||
|
|
||||||
%{<%s>\n%s</%s>\n} % [
|
%{<%s%s>\n%s</%s>\n} % [
|
||||||
list_type,
|
list_type,
|
||||||
|
list_start,
|
||||||
transform_list_items( list, rs ),
|
transform_list_items( list, rs ),
|
||||||
list_type,
|
list_type,
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user