1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Description: Fix documentation build errors
Author: Valentin Vidic <vvidic@debian.org>
Last-Update: 2025-04-02
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/doc/toolchain/lib/help2adoc/parser.py
+++ b/doc/toolchain/lib/help2adoc/parser.py
@@ -150,6 +150,9 @@
elif token.tpe == 'text':
buf.write(' ')
buf.write(token.text[token.indent:])
+ elif token.tpe == 'option':
+ buf.write(' ')
+ buf.write(token.text.lstrip())
else:
self.assert_token_tpe('emptyline', token)
tokens.rollback()
@@ -267,7 +270,7 @@
@classmethod
def assert_token_tpe(cls, tpe: str, token: Token):
if token.tpe != tpe:
- raise SyntaxErrorException(f'Expected: <{tpe}>. Actural: {token.text}')
+ raise SyntaxErrorException(f'Expected: <{tpe}>. Actual: <{token.tpe}>')
def parse_log(self, tokens: LookAheadIterator[Token]):
# TODO: remove me
|