docs: kdoc: split out the special-section state
authorJonathan Corbet <corbet@lwn.net>
Sat, 21 Jun 2025 20:35:07 +0000 (14:35 -0600)
committerJonathan Corbet <corbet@lwn.net>
Wed, 25 Jun 2025 17:30:26 +0000 (11:30 -0600)
commit74cee0dfc2fc50e0d53629c289dc9b2954d31b1c
tree7a23c3524eb10f159a3caa2aa848233abbca7e01
parente4153a2255b1a0f3398360895e79e7709a0600b2
docs: kdoc: split out the special-section state

The state known as BODY_WITH_BLANK_LINE really, in a convoluted way,
indicates a "special section" that is terminated by a blank line or the
beginning of a new section.  That is either "@param: desc" sections, or the
weird "context" section that plays by the same rules.

Rename the state to SPECIAL_SECTION and split its processing into a
separate function; no real changes to the logic yet.

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-5-corbet@lwn.net
scripts/lib/kdoc/kdoc_parser.py