docs: kdoc: coalesce the end-of-comment processing
authorJonathan Corbet <corbet@lwn.net>
Sat, 21 Jun 2025 20:35:10 +0000 (14:35 -0600)
committerJonathan Corbet <corbet@lwn.net>
Wed, 25 Jun 2025 17:30:26 +0000 (11:30 -0600)
commit2ad02b94914ab47b3b94274856e1b56cd94d3e31
treee5c94b317314c3060b4b6832a113f78c30ab8dfe
parente65d54e19149601b96a19790ee9ba9ed04c59abe
docs: kdoc: coalesce the end-of-comment processing

Separate out the end-of-comment logic into its own helper and remove the
duplicated code introduced earlier.

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