rouge-ruby / rouge

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

Porting Cisco IOS configuration lexer from pygments-routerlexers #1875

Closed chapmajs closed 1 year ago

chapmajs commented 2 years ago

This PR adds a port of pygments-routerlexers. The regexes largely come from pygments-routerlexers with a few changes to make them more consistent. Included sample files are from a writeup on my site and are given freely under this project's license, if that's acceptable.

chapmajs commented 2 years ago

How do I run the linelint tests locally? Looks like it's failing on my visual sample. I didn't see instructions for that particular test in the docs.

tancnle commented 2 years ago

How do I run the linelint tests locally? Looks like it's failing on my visual sample. I didn't see instructions for that particular test in the docs.

We are using Linelint in the CI. Sorry, we should have added it to the developer documentation. In the meanwhile, you can try:

I will create some follow-up PRs to add the doc and the convenient .editorconfig file soon.

chapmajs commented 2 years ago

There we go! Rebased on master, fixed the visual sample to comply with Linelint requirements.

chapmajs commented 2 years ago

Just checking in, anything this PR needs?

chapmajs commented 1 year ago

Checking in again, still running on my own fork to bring in this lexer.

tancnle commented 1 year ago

Checking in again, still running on my own fork to bring in this lexer.

Sorry for the delay @chapmajs. I have nothing to add. Happy to merge it as is 👍🏼 🚀

bowwowden commented 1 year ago

Sorry to resurrect an old thread, just dying to know about this at the moment and it seems like these are the people that may know. I'd like to embed cisco_ios highlights in a Jekyll GitHub pages site. Is this possible given gh pages disallows most plugins? When highlighting cisco_ios on my site it all shows as plain text one color. Doesn't rouge do the html highlighting, curious why I'm having this issue.

Here is a link. https://bowwowden.github.io/jekyll/update/2023/08/29/basic-template.html