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:
parent
2bd1aa186e
commit
15f54de5c4
1 changed files with 2 additions and 1 deletions
|
|
@ -931,7 +931,8 @@ proc getField1Int(d: PDoc, n: PRstNode, fieldName: string): int =
|
||||||
let nChars = parseInt(value, number)
|
let nChars = parseInt(value, number)
|
||||||
if nChars == 0:
|
if nChars == 0:
|
||||||
if value.len == 0:
|
if value.len == 0:
|
||||||
err("field $1 requires an argument" % [fieldName])
|
# use a good default value:
|
||||||
|
result = 1
|
||||||
else:
|
else:
|
||||||
err("field $1 requires an integer, but '$2' was given" %
|
err("field $1 requires an integer, but '$2' was given" %
|
||||||
[fieldName, value])
|
[fieldName, value])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue