mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
small documentation improvements
This commit is contained in:
@@ -1012,10 +1012,10 @@ proc whichSection(p: TRstParser): TRstNodeKind =
|
||||
result = rnOptionList
|
||||
else:
|
||||
result = rnParagraph
|
||||
of tkWord, tkOther, tkWhite:
|
||||
of tkWord, tkOther, tkWhite:
|
||||
if match(p, tokenAfterNewLine(p), "ai"): result = rnHeadline
|
||||
elif isDefList(p): result = rnDefList
|
||||
elif match(p, p.idx, "e) ") or match(p, p.idx, "e. "): result = rnEnumList
|
||||
elif isDefList(p): result = rnDefList
|
||||
else: result = rnParagraph
|
||||
else: result = rnLeaf
|
||||
|
||||
|
||||
@@ -390,7 +390,8 @@ proc renderField(d: PDoc, n: PRstNode, result: var string) =
|
||||
if d.target == outLatex:
|
||||
var fieldname = addNodes(n.sons[0])
|
||||
var fieldval = esc(d.target, strip(addNodes(n.sons[1])))
|
||||
if cmpIgnoreStyle(fieldname, "author") == 0:
|
||||
if cmpIgnoreStyle(fieldname, "author") == 0 or
|
||||
cmpIgnoreStyle(fieldname, "authors") == 0:
|
||||
if d.meta[metaAuthor].len == 0:
|
||||
d.meta[metaAuthor] = fieldval
|
||||
b = true
|
||||
|
||||
Reference in New Issue
Block a user