Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
8326e4a2 bc63427c

+3 -3
+3 -3
tools/lib/python/kdoc/kdoc_output.py
··· 846 846 colspec_row = None 847 847 848 848 pos = [] 849 - for m in KernRe(r'\-+').finditer(lines[i]): 849 + for m in KernRe(r'\=+').finditer(lines[i]): 850 850 pos.append((m.start(), m.end() - 1)) 851 851 852 852 i += 1 853 853 while i < len(lines): 854 854 line = lines[i] 855 855 856 - if KernRe(r"^\s*[\-]+[ \t\-]+$").match(line): 856 + if KernRe(r"^\s*[\=]+[ \t\=]+$").match(line): 857 857 i += 1 858 858 break 859 859 ··· 969 969 self.data += text 970 970 continue 971 971 972 - if KernRe(r"^\-+[ \t]\-[ \t\-]+$").match(line): 972 + if KernRe(r"^\=+[ \t]\=[ \t\=]+$").match(line): 973 973 i, text = self.simple_table(lines, i) 974 974 self.data += text 975 975 continue