From a516c773d14e9af15421a8eb33f68cb5e30b0336 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Thu, 28 Jul 2011 15:21:34 -0400 Subject: [PATCH] improved replacement filters for textile markup on github backtick codeblocks, added comment to show regular HTML support --- plugins/octopress_filters.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index 8c9367b..21c24ee 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -36,10 +36,11 @@ module OctopressFilters # Textile support input = input.gsub /

`{3}\s(\w+)\n(.+?)`{3}<\/p>/m do lang = $1 - str = $2.gsub(/^\s{4}/, '').gsub(/$/, '') + str = $2.gsub('<','<').gsub('>','>').gsub(/^\s{4}/, '').gsub(/()?$/, '') highlight(str, lang) end + # Regular HTML support input.gsub /^`{3}\s(\w+)\n(.+?)\n`{3}/m do lang = $1 str = $2.gsub(/^\s{4}/, '')