Markdown indented code blocks (#20473)
* Implement Markdown indented code blocks
Additional indentation of 4 spaces makes a block an "indented code block"
(monospaced text without syntax highlighting).
Also `::` RST syntax for code blocks is disabled.
So instead of
```rst
see::
Some code
```
the code block should be written as
```markdown
see:
Some code
```
* Migrate RST literal blocks :: to Markdown's ones
This commit is contained in:
parent
594e93a66b
commit
6505bd347d
33 changed files with 697 additions and 603 deletions
|
|
@ -377,13 +377,13 @@ proc renderRstToJsonNode(node: PRstNode): JsonNode =
|
|||
|
||||
proc renderRstToJson*(node: PRstNode): string =
|
||||
## Writes the given RST node as JSON that is in the form
|
||||
## ::
|
||||
## {
|
||||
## "kind":string node.kind,
|
||||
## "text":optional string node.text,
|
||||
## "level":optional int node.level,
|
||||
## "sons":optional node array
|
||||
## }
|
||||
##
|
||||
## {
|
||||
## "kind":string node.kind,
|
||||
## "text":optional string node.text,
|
||||
## "level":optional int node.level,
|
||||
## "sons":optional node array
|
||||
## }
|
||||
renderRstToJsonNode(node).pretty
|
||||
|
||||
proc renderRstToText*(node: PRstNode): string =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue