Browse Source

fixed bug in backtick_codeblock where indentations were being unintentionally removed

unreleased_contents
Brandon Mathis 13 years ago
parent
commit
d0f56ef1ca
  1. 3
      plugins/octopress_filters.rb

3
plugins/octopress_filters.rb

@ -28,7 +28,7 @@ module OctopressFilters
def backtick_codeblock(input) def backtick_codeblock(input)
input.gsub /<p>`{3}\s(\w+)<\/p>.+<pre><code>(.+)<\/code><\/pre>.+`{3}<\/p>/m do input.gsub /<p>`{3}\s(\w+)<\/p>.+<pre><code>(.+)<\/code><\/pre>.+`{3}<\/p>/m do
lang = $1 lang = $1
str = $2.gsub(/^\s{4}/, '').gsub('&lt;','<').gsub('&gt;','>') str = $2.gsub('&lt;','<').gsub('&gt;','>')
highlight(str, lang) highlight(str, lang)
end end
end end
@ -96,3 +96,4 @@ module OctopressFilters
end end
end end
Liquid::Template.register_filter OctopressFilters Liquid::Template.register_filter OctopressFilters

Loading…
Cancel
Save