mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-06 21:17:48 +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)
(cherry picked from commit 15f54de5c4)
This commit is contained in:
@@ -927,7 +927,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