diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index 92622b3..7d73bde 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -26,7 +26,7 @@ module OctopressFilters # code snippet # ``` def backtick_codeblock(input) - input.gsub /
`{3}\s(\w+)<\/p>.+
(.+)<\/code><\/pre>.+`{3}<\/p>/m do
+ input.gsub /`{3}\s(\w+)<\/p>\n\n
([^<]+)<\/code><\/pre>\n\n`{3}<\/p>/m do
lang = $1
str = $2.gsub('<','<').gsub('>','>')
highlight(str, lang)