fixed bug where multiple github style codeblcoks were getting eaten

source
Brandon Mathis 2011-07-27 18:32:06 -04:00
parent 0911eabb9b
commit 4a2254665c
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ module OctopressFilters
# code snippet
# ```
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>\n\n<pre><code>([^<]+)<\/code><\/pre>\n\n<p>`{3}<\/p>/m do
lang = $1
str = $2.gsub('&lt;','<').gsub('&gt;','>')
highlight(str, lang)