docs: kdoc: split the processing of the two remaining inline states
authorJonathan Corbet <corbet@lwn.net>
Fri, 27 Jun 2025 18:40:00 +0000 (12:40 -0600)
committerJonathan Corbet <corbet@lwn.net>
Tue, 1 Jul 2025 19:11:58 +0000 (13:11 -0600)
commit0cde7924b8de5abec29f03519ce9486b27c809ea
tree3b3b26d6833f3845c7a879edefec4d48489ef1d0
parent8976f993a3aa8c00699ed5cb1bc939e11c88a713
docs: kdoc: split the processing of the two remaining inline states

Now that "inline_*" are just ordinary parser states, split them into two
separate functions, getting rid of some nested conditional logic.

The original process_inline() would simply ignore lines that didn't match
any of the regexes (those lacking the initial " * " marker).  I have
preserved that behavior, but we should perhaps emit a warning instead.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627184000.132291-9-corbet@lwn.net
scripts/lib/kdoc/kdoc_parser.py