fixed bug where multiple github style codeblcoks were getting eaten
This commit is contained in:
parent
0911eabb9b
commit
4a2254665c
@ -26,7 +26,7 @@ module OctopressFilters
|
|||||||
# code snippet
|
# code snippet
|
||||||
# ```
|
# ```
|
||||||
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>\n\n<pre><code>([^<]+)<\/code><\/pre>\n\n<p>`{3}<\/p>/m do
|
||||||
lang = $1
|
lang = $1
|
||||||
str = $2.gsub('<','<').gsub('>','>')
|
str = $2.gsub('<','<').gsub('>','>')
|
||||||
highlight(str, lang)
|
highlight(str, lang)
|
||||||
|
Loading…
Reference in New Issue
Block a user