]> git.ipfire.org Git - thirdparty/linux.git/commit
docs: kdoc_re: better represent long regular expressions
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 18 Mar 2026 09:11:02 +0000 (10:11 +0100)
committerJonathan Corbet <corbet@lwn.net>
Sun, 22 Mar 2026 21:10:40 +0000 (15:10 -0600)
commitb2d231f4a77800661b3fb812d997841a548c6526
tree782586ce1f2df7cfcd0a8798484f51c2422a1a00
parent14b7775ef7471fbb9380048aabb3e96faa1e9123
docs: kdoc_re: better represent long regular expressions

The Sphinx output from autodoc doesn't automatically break long
lines, except on spaces.

Change KernRe __repr__() to break the pattern on multiple strings,
each one with a maximum limit of 60 characters.

With that, documentation output for KernRe should now be displayable,
even on long strings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <60c264a9d277fed655b1a62df2195562c8596090.1773823995.git.mchehab+huawei@kernel.org>
tools/lib/python/kdoc/kdoc_re.py