mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-12-25 08:58:58 -05:00
fixed bug in backtick_codeblock where indentations were being unintentionally removed
This commit is contained in:
parent
6e2beaa969
commit
d0f56ef1ca
@ -28,7 +28,7 @@ module OctopressFilters
|
|||||||
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>.+<pre><code>(.+)<\/code><\/pre>.+`{3}<\/p>/m do
|
||||||
lang = $1
|
lang = $1
|
||||||
str = $2.gsub(/^\s{4}/, '').gsub('<','<').gsub('>','>')
|
str = $2.gsub('<','<').gsub('>','>')
|
||||||
highlight(str, lang)
|
highlight(str, lang)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -96,3 +96,4 @@ module OctopressFilters
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
Liquid::Template.register_filter OctopressFilters
|
Liquid::Template.register_filter OctopressFilters
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user