Closed Phrogz closed 11 years ago
It would be nice if this warning could only be emitted once per language per process.
Good idea. Can you make a PR?
Will do. (Now that I've locally added support for Lua, this is a much lower priority for me, though. ;)
BTW, I tried to figure out how to make a test for this, but couldn't figure it out. I'll probably PR without one.
There's an assert_warning
helper somewhere.
I just disabled the warning completely. If we define a :default
in the _map.rb
file, it expresses intent to have a fallback instead of an error: Scanners fall back to plain text, while Encoders will raise an error.
I am converting many small Markdown snippets using kramdown+CodeRay.
Each time there is a code block tagged with the Lua language I get:
As a result my automated script for generating documentation is spitting out ~100 lines on stderr where one would suffice.
It would be nice if this warning could only be emitted once per language per process. Would you accept a patch for this, e.g. storing an instance variable on
CodeRay::PluginHost
referencing a hash of languages that have been warned about?