Skip to content

google+numpydoc: match section titles literally - #134

Merged
rr- merged 1 commit into
mainfrom
escape-section-titles
Nov 2, 2026
Merged

rr- merged 1 commit into
mainfrom
escape-section-titles

Conversation

@rr-

@rr- rr- commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Section titles went into the title regex unescaped, but the parsers look sections up by their literal title. So a custom title like Notes? or Args (old) was silently ignored, and C++ Notes made GoogleParser() raise re.error. Titles are now escaped in Google and Numpydoc.

Since a title using regex syntax could never be looked up, nothing that worked before changes.

@rr-
rr- requested a review from mauvilsa October 27, 2026 23:54
Section titles went into the title regex as they were, while the
parsers look sections up by their literal title. So a title such as
"Notes?" was silently ignored, and one such as "C++ Notes" made
building the parser raise re.error. Titles are now escaped.
@rr-
rr- force-pushed the escape-section-titles branch from 862ec12 to efc46b9 Compare November 2, 2026 09:47
@rr-
rr- merged commit d616a15 into main Nov 2, 2026
23 checks passed
@rr-
rr- deleted the escape-section-titles branch November 6, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant