Black Mamba

Faster, Higher, Stronger.

Octopress Error: Pygments Can’t Parse Unknown Language: </p>

Octopress is good, but not perfect.

  • One of the common error when type “rake generate” is:
1
Error: Pygments can't parse unknown language: </p>

Although there is a error, jekyll don’t point out the detailed location where the error come from in its default setting. It was very annoying.

To deal with the error, one way is modify the Ruby file plugins/pygments_code.rb, add #{code} after #{lang}:

1
2
3
rescue MentosError
raise "Pygments can't parse unknown language: #{lang}#{code}."
end

Then, when “rake generate” again, the error location will be listed.

  • Another thing worth noted is that when blogging ‘’ should be replaced with ‘ ’, i.e., add a blank between ‘’, otherwise, when rake generate, ‘’ without blank between them will also produce this error and it is difficult to detect through error description

Comments