Render highlighted code for non markdown/textile pages. Fixes #116
This commit is contained in:
parent
fff313a62d
commit
2b2e027b34
|
@ -1,3 +1,7 @@
|
||||||
|
== Edge
|
||||||
|
* Bug Fixes
|
||||||
|
* Render highlighted code for non markdown/textile pages (#116)
|
||||||
|
|
||||||
== 0.5.7 / 2010-01-12
|
== 0.5.7 / 2010-01-12
|
||||||
* Minor Enhancements
|
* Minor Enhancements
|
||||||
* Allow overriding of post date in the front matter (#62, #38)
|
* Allow overriding of post date in the front matter (#62, #38)
|
||||||
|
|
|
@ -31,10 +31,10 @@ module Jekyll
|
||||||
|
|
||||||
def render_pygments(context, code)
|
def render_pygments(context, code)
|
||||||
output = add_code_tags(Albino.new(code, @lang).to_s(@options), @lang)
|
output = add_code_tags(Albino.new(code, @lang).to_s(@options), @lang)
|
||||||
if context["content_type"] == "markdown"
|
case context["content_type"]
|
||||||
return "\n" + output + "\n"
|
when "markdown" then "\n" + output + "\n"
|
||||||
elsif context["content_type"] == "textile"
|
when "textile" then "<notextile>" + output + "</notextile>"
|
||||||
return "<notextile>" + output + "</notextile>"
|
else output
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue