rst: single backticks now render correctly in both rst2html and github (#17028)
* rst: `` => ` * support default-role in rst2html * update docstyle regarding single vs double backticks
This commit is contained in:
parent
eb8cc51bb8
commit
190fe36eba
6 changed files with 76 additions and 60 deletions
|
|
@ -1978,6 +1978,10 @@ proc dirAdmonition(p: var RstParser, d: string): PRstNode =
|
|||
result.kind = rnAdmonition
|
||||
result.text = d
|
||||
|
||||
proc dirDefaultRole(p: var RstParser): PRstNode =
|
||||
result = parseDirective(p, {hasArg}, nil)
|
||||
result.kind = rnDefaultRole
|
||||
|
||||
proc dirRawAux(p: var RstParser, result: var PRstNode, kind: RstNodeKind,
|
||||
contentParser: SectionParser) =
|
||||
var filename = getFieldValue(result, "file")
|
||||
|
|
@ -2037,6 +2041,7 @@ proc selectDir(p: var RstParser, d: string): PRstNode =
|
|||
of "tip": result = dirAdmonition(p, d)
|
||||
of "title": result = dirTitle(p)
|
||||
of "warning": result = dirAdmonition(p, d)
|
||||
of "default-role": result = dirDefaultRole(p)
|
||||
else:
|
||||
rstMessage(p, meInvalidDirective, d)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue