Browse code

fixed bug in backtick_codeblock where indentations were being unintentionally removed

Brandon Mathis authored on 27/07/2011 at 03:56:14
Showing 1 changed files
... ...
@@ -28,7 +28,7 @@ module OctopressFilters
28 28
   def backtick_codeblock(input)
29 29
     input.gsub /<p>`{3}\s(\w+)<\/p>.+<pre><code>(.+)<\/code><\/pre>.+`{3}<\/p>/m do
30 30
       lang = $1
31
-      str  = $2.gsub(/^\s{4}/, '').gsub('&lt;','<').gsub('&gt;','>')
31
+      str  = $2.gsub('&lt;','<').gsub('&gt;','>')
32 32
       highlight(str, lang)
33 33
     end
34 34
   end
... ...
@@ -96,3 +96,4 @@ module OctopressFilters
96 96
   end
97 97
 end
98 98
 Liquid::Template.register_filter OctopressFilters
99
+