Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow Raises and Warns sections to start with a newline #149

Merged
merged 4 commits into from
Apr 16, 2023

Conversation

viccie30
Copy link
Contributor

@viccie30 viccie30 commented Apr 16, 2023

According to the documentation it's possible to start a description with a newline.
However, this did not work properly for Raises and Warns sections, because of a stray space in the regex to split the annotation and its description.

According to the it's possible to start a description with a newline.
However, this did not work properly for Raises and Warns sections,
because of a stray space in the regex to split the annotation and its description.
@pawamoy
Copy link
Member

pawamoy commented Apr 16, 2023

Nice catch, thanks a lot!

According to the documentation it's possible to start a description with a newline.
However, this did not work properly for Raises and Warns sections,
because of a stray space in the regex to split the annotation and its description.
@viccie30 viccie30 force-pushed the fix-newline-in-raises-and-warns branch from a94932f to 78a5ad3 Compare April 16, 2023 11:34
@viccie30
Copy link
Contributor Author

I just realised I missed a word in my commit message, so I've force pushed the same commit with the missing word in the message added.

@pawamoy
Copy link
Member

pawamoy commented Apr 16, 2023

I've added a test for it. LGTM, WDYT?

@viccie30
Copy link
Contributor Author

Looks good to me as well!

@pawamoy pawamoy merged commit f3b088c into mkdocstrings:master Apr 16, 2023
@pawamoy
Copy link
Member

pawamoy commented Apr 16, 2023

I've also found out warnings sections were never parsed as such. Just released both fixes as 0.27.1.

@viccie30 viccie30 deleted the fix-newline-in-raises-and-warns branch April 16, 2023 13:45
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.

2 participants