From e157cd242bbed14857a59d533091515ed905f189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20F?= Date: Sun, 24 Apr 2022 17:15:58 +0200 Subject: [PATCH] doc: Add syntax highlighting For better readability --- docs/examples/renderer_rules.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/examples/renderer_rules.md b/docs/examples/renderer_rules.md index 7318b7a..ae101f9 100644 --- a/docs/examples/renderer_rules.md +++ b/docs/examples/renderer_rules.md @@ -2,14 +2,14 @@ ## Default renderer rules Rules on how to translate markdown content to HTML elements are stored in `renderer.rules`: -``` +```js const MarkdownIt = require('markdown-it'); const md = new MarkdownIt(); console.log(Object.keys(md.renderer.rules)) ``` Output: -``` +```js [ 'code_inline', 'code_block', @@ -32,7 +32,7 @@ Let's use a Hello World example: [Link to Demo](https://markdown-it.github.io/#md3=%7B%22source%22%3A%22-%20Hello%20World%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Afalse%2C%22typographer%22%3Afalse%2C%22_highlight%22%3Afalse%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22debug%22%7D%7D) Now take a closer look at the first element in the resulting list: -``` +```js { "type": "bullet_list_open", "tag": "ul", @@ -67,7 +67,7 @@ Create a rule to add the CSS class "lorem_ipsum" to every