Browse code

fixed bug where multiple github style codeblcoks were getting eaten

Brandon Mathis authored on 27/07/2011 at 22:32:06
Showing 1 changed files
... ...
@@ -26,7 +26,7 @@ module OctopressFilters
26 26
   #     code snippet
27 27
   # ```
28 28
   def backtick_codeblock(input)
29
-    input.gsub /<p>`{3}\s(\w+)<\/p>.+<pre><code>(.+)<\/code><\/pre>.+`{3}<\/p>/m do
29
+    input.gsub /<p>`{3}\s(\w+)<\/p>\n\n<pre><code>([^<]+)<\/code><\/pre>\n\n<p>`{3}<\/p>/m do
30 30
       lang = $1
31 31
       str  = $2.gsub('&lt;','<').gsub('&gt;','>')
32 32
       highlight(str, lang)