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

Improve \Psalm\Internal\Scanner\DocblockParser::parse() #3736

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

lhchavez
Copy link
Contributor

@lhchavez lhchavez commented Jul 2, 2020

This change avoids calling str_replace() on the original docblock and
instead only operates on the parsed (and modified) lines. This now makes
it so that if there are substrings of the docblock that match a tag
match, it won't get prematurely removed, therefore avoiding mangling of
the parsed docblock's description.

Fixes: #3735

This change avoids calling `str_replace()` on the original docblock and
instead only operates on the parsed (and modified) lines. This now makes
it so that if there are substrings of the docblock that match a tag
match, it won't get prematurely removed, therefore avoiding mangling of
the parsed docblock's description.

Fixes: vimeo#3735
@muglug muglug merged commit ba63ccb into vimeo:master Jul 2, 2020
@muglug
Copy link
Collaborator

muglug commented Jul 2, 2020

Thanks!

@lhchavez lhchavez deleted the fix-docblock-parser branch July 2, 2020 21:57
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.

\Psalm\Internal\Scanner\DocblockParser::parse() mangles the parsed docblock
2 participants