mirror of
https://github.com/moparisthebest/www.moparscape.org
synced 2024-12-25 08:58:49 -05:00
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
|
||||
# ```
|
||||
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('<','<').gsub('>','>')
|
||||
highlight(str, lang)
|
||||
|
Loading…
Reference in New Issue
Block a user