You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing a little tutorial on regular expressions for students, with code blocks such as:
^Hello
Is there a way to highlight regular expressions syntax in code blocks? Something like:
```regex
^Hello
```
In this example, the ^ would be highlighted.
I did a very naïve check of pandoc --list-highlight-languages as well as KDE’s repository of syntax definitions for strings like "regex" or "pcre", but I am not familiar enough with programming languages to identify one that would do this, nor could I adapt something like Regex Colorizer to work with pandoc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am writing a little tutorial on regular expressions for students, with code blocks such as:
Is there a way to highlight regular expressions syntax in code blocks? Something like:
In this example, the
^would be highlighted.I did a very naïve check of
pandoc --list-highlight-languagesas well as KDE’s repository of syntax definitions for strings like "regex" or "pcre", but I am not familiar enough with programming languages to identify one that would do this, nor could I adapt something like Regex Colorizer to work with pandoc.Has anyone else needed to do this?
Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions