[Notes] syntax highlighting

Does anyone know of any plans to introduce "syntax highlighting" in notes or know of an extension?

Right now I write code snippets in "monospaced" note format.

It would drastically improve readability if my code snippets could be highlighted in a specific language.

Possible way a syntax note should be written:
- start with ``` (grave accents)
- add the 1st argument to set the language, e.g. JavaScript (js)
- see this link for more languages https://pygments.org/languages/


```lang=js
const factorialize = x => x < 1 ? 1 : factorialize(x - 1) * x
factorialize(5)
```

- other arguments could be: "line number", "mark a specific line" and a "name" for the snippet.

```lang=js, lineno=3, marks=4, name="Factorialize a number"
const factorialize = x => x < 1 ? 1 : factorialize(x - 1) * x
factorialize(5)
```

Below is a list of documentation from projects that support "syntax highlighting":
- https://trac.edgewall.org/wiki/WikiProcessors
- https://secure.phabricator.com/book/phabricator/article/remarkup/
- https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks
Sign In or Register to comment.