Code hilighter needs to handle blanks lines.
This commit is contained in:
@@ -321,7 +321,7 @@ module Gollum
|
||||
@codemap.each do |id, spec|
|
||||
lang = spec[:lang]
|
||||
code = spec[:code]
|
||||
if code.all? { |line| line =~ /^( |\t)/ }
|
||||
if code.all? { |line| line =~ /\A\r?\n\Z/ || line =~ /^( |\t)/ }
|
||||
code.gsub!(/^( |\t)/m, '')
|
||||
end
|
||||
data.gsub!(id, Gollum::Albino.new(code, lang).colorize)
|
||||
|
||||
Reference in New Issue
Block a user