scripts/kernel-doc: Do not process backslash lines in comments
authorAnna-Maria Behnsen <anna-maria@linutronix.de>
Mon, 22 Jan 2024 09:31:52 +0000 (10:31 +0100)
committerJonathan Corbet <corbet@lwn.net>
Tue, 30 Jan 2024 20:03:01 +0000 (13:03 -0700)
To prevent this, do the pre-processing only for lines which are no
comments, e.g. do not start with ' *'.

Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240122093152.22536-3-anna-maria@linutronix.de
scripts/kernel-doc

index e8aefd258a29adfb37042715d75bb51988b1a9f5..4277af79de86592297d0e4fb57956030213dcb42 100755 (executable)
@@ -2331,7 +2331,7 @@ sub process_file($) {
 
     $section_counter = 0;
     while (<IN_FILE>) {
-       while (s/\\\s*$//) {
+       while (!/^ \*/ && s/\\\s*$//) {
            $_ .= <IN_FILE>;
        }
        # Replace tabs by spaces