File: 0025-Fix_doc_build.patch

package info (click to toggle)
crmsh 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,980 kB
  • sloc: python: 50,399; sh: 1,207; makefile: 255; xml: 243; exp: 234; awk: 22
file content (26 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download | duplicates (2)
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