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

Accept Windows/DOS line breaks in phpdoc summary #433

Merged
merged 1 commit into from
Aug 31, 2017
Merged

Accept Windows/DOS line breaks in phpdoc summary #433

merged 1 commit into from
Aug 31, 2017

Conversation

jojonas
Copy link
Contributor

@jojonas jojonas commented Aug 31, 2017

The phpdoc content is statically parsed (in Context.php). During parsing, the comments are split into an array of lines. Previously, the code used explode("\n", ...) in order to split at Unix (lf) line breaks. In order to also be able to accept Windows/DOS line breaks (cr + lf), explode is replaced by splitting with preg_split on either \n or \r\n.

The phpdoc content is statically parsed (in Context.php). During parsing,
the comments are split into an array of lines. Previously, the code used
explode("\n", ...) in order to split at Unix (lf) line breaks. In order to
also be able to accept Windows/DOS line breaks (cr + lf), explode is
replaced by splitting with preg_split on either \n or \r\n.
@bfanger
Copy link
Collaborator

bfanger commented Aug 31, 2017

Thanks!

@bfanger bfanger merged commit 2f514f9 into zircote:master Aug 31, 2017
@jojonas jojonas deleted the bugfixes branch August 31, 2017 19:17
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