Render highlighted code for non markdown/textile pages. Fixes #116

This commit is contained in:
Tom Preston-Werner 2010-01-13 21:30:45 -08:00
parent fff313a62d
commit 2b2e027b34
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
== Edge
* Bug Fixes
* Render highlighted code for non markdown/textile pages (#116)
== 0.5.7 / 2010-01-12
* Minor Enhancements
* Allow overriding of post date in the front matter (#62, #38)

View File

@ -31,10 +31,10 @@ module Jekyll
def render_pygments(context, code)
output = add_code_tags(Albino.new(code, @lang).to_s(@options), @lang)
if context["content_type"] == "markdown"
return "\n" + output + "\n"
elsif context["content_type"] == "textile"
return "<notextile>" + output + "</notextile>"
case context["content_type"]
when "markdown" then "\n" + output + "\n"
when "textile" then "<notextile>" + output + "</notextile>"
else output
end
end