andreasKroepelin / polylux

A package for creating slides in Typst
https://polylux.dev/book
MIT License
1.18k stars 55 forks source link

Add mdbook-typst-highlight #110

Open sitandr opened 1 year ago

sitandr commented 1 year ago

See running version with highlight there: https://sitandr.github.io/polylux/book/dynamic/syntax.html

I'm not sure, maybe it will be better to disable highlighting inline code, especially considering that #var and #fn() are colored differently. I guess it should be up to you, so I've left two lines commented in book.toml (the second one is for the case you are lazy putting ```typ at code blocks everywhere.

andreasKroepelin commented 1 year ago

Awesome, thank you!

I am in favour of disabling highlighting for inline code (not all of that is Typst code, to begin with) and disabling highlighting for block code without typ as the language.

I will have to review the preprocessors code prior to merging this, so expect it to take a while (I am quite busy at the moment).