This commit is contained in:
bootstraponline
2012-10-23 22:14:45 -06:00
parent 4af6f366ca
commit a1ae2e8bc0
+3 -1
View File
@@ -543,7 +543,9 @@ module Gollum
blocks.each do |lang, code|
encoding ||= 'utf-8'
begin
hl_code = Pygments.highlight(code, :lexer => lang, :options => {:encoding => encoding.to_s})
# must set startinline to true for php to be highlighted without <?
# http://pygments.org/docs/lexers/
hl_code = Pygments.highlight(code, :lexer => lang, :options => {:encoding => encoding.to_s, :startinline => true})
rescue
hl_code = code
end