From ff1dba19f2f08e31a928778bdd94663b98d7dc19 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Mon, 1 Aug 2011 09:06:37 -0400 Subject: Backtick codeblocks now correctly replace & with & and Textile support for back tick code blocks has been removed. It never really worked. Textile makes me sad. --- plugins/octopress_filters.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins') diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index f2a5073b..67118b53 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -30,22 +30,17 @@ module OctopressFilters input = input.gsub /

`{3}\s*(\w+)?<\/p>\s*

\s*(.+?)\s*<\/code><\/pre>\s*

`{3}<\/p>/m do lang = $1 if lang != '' - str = $2.gsub('<','<').gsub('>','>') + str = $2.gsub('<','<').gsub('>','>').gsub('&','&') highlight(str, lang) else "

#{$2}
" end end - # Textile support + # Textile warning input = input.gsub /

`{3}\s*(\w+)?\n(.+?)`{3}<\/p>/m do lang = $1 - str = $2.gsub('<','<').gsub('>','>').gsub(/^\s{4}/, '').gsub(/()?$/, '') - if lang != '' - highlight(str, lang) - else - "

#{$2}
" - end + "
Back tick code blocks are not supported for Textile.\nTry HTML or Markdown instead or use the codeblock tag.\n\n{% codeblock #{lang} %}\nYour code snippet\n{% endcodeblock %}
" end # Regular HTML support -- cgit v1.2.1