diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2026-03-23 10:10:49 +0100 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2026-03-25 13:36:46 -0600 |
| commit | 8326e4a21838593fe67b5d79ba6d0dc8e962ebb9 (patch) | |
| tree | d54393fd7173e44bb22c878c67e36ad1091b39af /tools/lib/python/kdoc | |
| parent | bc63427c4d1031c761639aa42ae5a77beabfa98b (diff) | |
docs: kdoc_output: fix handling of simple tables
Fix check for simple table delimiters.
ReST simple tables use "=" instead of "-". I ended testing it with
a table modified from a complex one, using "--- --- ---", instead
of searching for a real Kernel example.
Only noticed when adding an unit test and seek for an actual
example from kernel-doc markups.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <dea95337c05040f95e5a95ae41d69ddef0aaa8d6.1774256269.git.mchehab+huawei@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
| -rw-r--r-- | tools/lib/python/kdoc/kdoc_output.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/lib/python/kdoc/kdoc_output.py b/tools/lib/python/kdoc/kdoc_output.py index 1b54117dbe19..2bfcd356654b 100644 --- a/tools/lib/python/kdoc/kdoc_output.py +++ b/tools/lib/python/kdoc/kdoc_output.py @@ -846,14 +846,14 @@ class ManFormat(OutputFormat): colspec_row = None pos = [] - for m in KernRe(r'\-+').finditer(lines[i]): + for m in KernRe(r'\=+').finditer(lines[i]): pos.append((m.start(), m.end() - 1)) i += 1 while i < len(lines): line = lines[i] - if KernRe(r"^\s*[\-]+[ \t\-]+$").match(line): + if KernRe(r"^\s*[\=]+[ \t\=]+$").match(line): i += 1 break @@ -969,7 +969,7 @@ class ManFormat(OutputFormat): self.data += text continue - if KernRe(r"^\-+[ \t]\-[ \t\-]+$").match(line): + if KernRe(r"^\=+[ \t]\=[ \t\=]+$").match(line): i, text = self.simple_table(lines, i) self.data += text continue |
