docs: kdoc: finish disentangling the BODY and SPECIAL_SECTION states
authorJonathan Corbet <corbet@lwn.net>
Sat, 21 Jun 2025 20:35:12 +0000 (14:35 -0600)
committerJonathan Corbet <corbet@lwn.net>
Wed, 25 Jun 2025 17:30:26 +0000 (11:30 -0600)
commit07e04d8e7dceae9822377abcb2dd07aae5747e7d
tree5364623e48f6e3ce3ab7cf45986db8ceeeade74c
parentccad65a494657e899f9139174fcc74c64316c10a
docs: kdoc: finish disentangling the BODY and SPECIAL_SECTION states

Move the last SPECIAL_SECTION special case into the proper handler
function, getting rid of more if/then/else logic.  The leading-space
tracking was tightened up a bit in the move.  Add some comments describing
what is going on.

No changes to the generated output.

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