mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
RST: allow empty number-lines directives just like it was done for a decade; all my documents rely on this feature [backport (#19431)
This commit is contained in:
@@ -931,7 +931,8 @@ proc getField1Int(d: PDoc, n: PRstNode, fieldName: string): int =
|
||||
let nChars = parseInt(value, number)
|
||||
if nChars == 0:
|
||||
if value.len == 0:
|
||||
err("field $1 requires an argument" % [fieldName])
|
||||
# use a good default value:
|
||||
result = 1
|
||||
else:
|
||||
err("field $1 requires an integer, but '$2' was given" %
|
||||
[fieldName, value])
|
||||
|
||||
Reference in New Issue
Block a user