Fixes #568, triple-tilde without language causes crash

This commit is contained in:
Daniel Kimsey
2012-11-06 15:39:39 -05:00
parent dc06edcf5b
commit b95df93775
+4 -2
View File
@@ -488,8 +488,10 @@ module Gollum
# extract lang from { .ruby } or { #stuff .ruby .indent }
# see http://johnmacfarlane.net/pandoc/README.html#delimited-code-blocks
lang = lang.match(/\.([^}\s]+)/)
lang = lang[1] unless lang.nil?
if lang
lang = lang.match(/\.([^}\s]+)/)
lang = lang[1] unless lang.nil?
end
@codemap[id] = cached ?
{ :output => cached } :