From 2e3f83286dbf086550ee7819acb8516cac72215e Mon Sep 17 00:00:00 2001 From: Klaus Jensen Date: Fri, 9 Feb 2024 09:29:40 +0100 Subject: [PATCH] docs: update kerneldoc.py from linux Update kerneldoc.py from linux kernel, fixing a couple of deprecation warnings. Signed-off-by: Klaus Jensen --- docs/sphinx/kerneldoc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/kerneldoc.py b/docs/sphinx/kerneldoc.py index 8189c33b..7acf0996 100644 --- a/docs/sphinx/kerneldoc.py +++ b/docs/sphinx/kerneldoc.py @@ -130,7 +130,7 @@ def run(self): result = ViewList() lineoffset = 0; - line_regex = re.compile("^#define LINENO ([0-9]+)$") + line_regex = re.compile(r"^\.\. LINENO ([0-9]+)$") for line in lines: match = line_regex.search(line) if match: @@ -138,7 +138,7 @@ def run(self): lineoffset = int(match.group(1)) - 1 # we must eat our comments since the upset the markup else: - doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno) + doc = str(env.srcdir) + "/" + env.docname + ":" + str(self.lineno) result.append(line, doc + ": " + filename, lineoffset) lineoffset += 1