jgm / skylighting

A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions
194 stars 62 forks source link

Support highlighting for console sessions #67

Open ricpelo opened 5 years ago

ricpelo commented 5 years ago

Hi! Is it planned syntax highlighting for console sessions? Something like highlight.js do with the shell language definition. (See demo, scroll down to Shell Session section.)

I'm writing teaching material with Pandoc and I need to write many shell commands with console sessions.

Thanks in advance!

jgm commented 5 years ago

You'd have to see if there's a KDE syntax definition (xml) file for this. If not, you could try creating one. Then it would be possible to add it, or just use it from pandoc without adding it to this library, via --syntax-definition.

ricpelo commented 5 years ago

I'll try to do my own syntax definition file, thank you!

chebro commented 2 years ago

I'll try to do my own syntax definition file, thank you!

@ricpelo if you happened to create one would you mind sharing it here?

i used this answer from stackoverflow answer as reference but i couldn't get it working.

ricpelo commented 2 years ago

@ricpelo if you happened to create one would you mind sharing it here?

Sure, but I'm afraid it's really ugly, although it works for my needs. Hope it helps you.

Check my gist to get it:

https://gist.github.com/ricpelo/1ceb8e052956097d1b5192b2f3148367