... | ... |
@@ -36,10 +36,11 @@ module OctopressFilters |
36 | 36 |
# Textile support |
37 | 37 |
input = input.gsub /<p>`{3}\s(\w+)<br\s*\/>\n(.+?)`{3}<\/p>/m do |
38 | 38 |
lang = $1 |
39 |
- str = $2.gsub(/^\s{4}/, '').gsub(/<br\s*\/>$/, '') |
|
39 |
+ str = $2.gsub('<','<').gsub('>','>').gsub(/^\s{4}/, '').gsub(/(<br\s\/>)?$/, '') |
|
40 | 40 |
highlight(str, lang) |
41 | 41 |
end |
42 | 42 |
|
43 |
+ # Regular HTML support |
|
43 | 44 |
input.gsub /^`{3}\s(\w+)\n(.+?)\n`{3}/m do |
44 | 45 |
lang = $1 |
45 | 46 |
str = $2.gsub(/^\s{4}/, '') |