Skip to content

Documentation Code Highlighting

Block Highlighting

To apply code highlighting to a block of code, surround it with triple backticks (```) and write the name of the language after the starting backticks, like this:

```python
def foo():
    pass
```
def foo():
    pass

Inline Highlighting

To apply code highlighting to inline code, surround the code with single backticks (`) and add #! after the initial backtick, followed by the language name:

Call the `#!python def foo()` function.

Call the def foo() function.

Languages

The highlighter supports all languages supported by Pygments.

The Pygments project has a list of all supported languages. To use a language, refer to it through one of its short names.

Additionally, in this Spoofax documentation these Spoofax languages are supported:

Short name Language
aterm ATerms.
dynsem DynSem.
esv ESV.
flowspec FlowSpec.
nabl NaBL.
nabl2 NaBL2.
sdf3 SDF3.
statix Statix.
stratego Stratego.

Last update: April 19, 2024
Created: April 19, 2024