pygments / pygments.rb

💎 Ruby wrapper for Pygments syntax highlighter
MIT License
572 stars 141 forks source link

Support content-only lexer_name_for. #40

Closed pwnall closed 12 years ago

pwnall commented 12 years ago

Thank you very much for the new pipe-based approach in pygments 0.3! rubypython kept crashing my Rails processes, so I had to disable syntax highlighting and wait for this.

Unfortunately, the piping changes lost support for passing code, with no metadata, into lexer_name_for.

This patch adds that support back, together with a (previously failing) test.

I hope you'll consider merging this patch. Please let me know if there are formatting / naming / other issues I can address. Thanks!

tnm commented 12 years ago

Cool, seems reasonable. I'm going to wait a bit for the dust to clear across the board before cutting the next point release of the gem, but happy to merge this in now. Thanks!

pwnall commented 12 years ago

Sweet, thanks for the fast response! :thumbsup: