|
b0717e70
|
2018-12-01T21:09:13
|
|
Add support for code blocks in Markdown (#1562)
It also supports syntax highlighting!
The highlighting is done in two steps:
1. Add an alias `language-****` containing the given language to the `code-block`
token.
This happens in the `after-tokenize` hook.
2. Highlight the code with the `wrap` hook.
This is to get around the encoding (`util.encode`) of tokens in `Prism.highlight`.
By using this procedure we get the correct execution of the `before-tokenize`,
`after-tokenize`, and `wrap` hook for all included languages.
|