rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.31k stars 731 forks source link

support asciidoc highlighting #595

Open matthiasbalke opened 7 years ago

matthiasbalke commented 7 years ago

Please add asciidoc(tor) syntax highlighting.

mojavelinux commented 7 years ago

Most of the logic for this has been done in the grammar for Atom (highlights). That's more or less become the "standard" set of grammar rules as they are based off of the rules used by Asciidoctor itself.

See https://github.com/asciidoctor/atom-language-asciidoc/blob/master/grammars/language-asciidoc.cson

It's not a simple language to parse. I recommend starting with the section titles (aka headings) and delimited blocks as those provide the backbone of the structure.

Feel free to mention me if you need advice.

stale[bot] commented 5 years ago

This contribution has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days.

mojavelinux commented 5 years ago

I don't see a reason for this to stay open unless someone is actually going to do it. While I certainly could, I don't have the time to work on it right now.

If someone is interested, you could also use the simple support in highlight.js to get started. See https://github.com/highlightjs/highlight.js/blob/master/src/languages/asciidoc.js