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

Convert newlines to spaces and consider the first sentence ended only if the dot is followed by a space in BaseDoc::extractFirstSentence() #282

Merged
merged 13 commits into from
Mar 29, 2022

Conversation

WinterSilence
Copy link
Contributor

@WinterSilence WinterSilence commented Mar 20, 2022

source comment:

a URI [RFC3986](https://tools.ietf.org/html/rfc3986) or
URI template [RFC6570](https://tools.ietf.org/html/rfc6570). This property is required.

before fix BaseDoc::extractFirstSentence() return:
a URI [RFC3986](https://tools.
after:
a URI [RFC3986](https://tools.ietf.org/html/rfc3986) or URI template [RFC6570](https://tools.ietf.org/html/rfc6570).
is dirty fix, but covering main cases

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues

Minor additions for historical purposes by @arogachev.

Newline (only affects HTML code, not visual output):

https://github.com/yiisoft/yii2/blob/2874e070f3ad88c727b1335ba4f4515855bf5f64/framework/base/Controller.php#L48-L52

Screenshot 2022-03-29 at 11-54-27 Controller yii_base_Controller

No space after dot:

Screenshot 2022-03-29 at 11-49-16 Link yii_web_Link

source comment:
~~~markdown
a URI [RFC3986](https://tools.ietf.org/html/rfc3986) or
URI template [RFC6570](https://tools.ietf.org/html/rfc6570). This property is required.
~~~
before fix `BaseDoc::extractFirstSentence()` return:
`a URI [RFC3986](https://tools.`
after:
`a URI [RFC3986](https://tools.ietf.org/html/rfc3986) or URI template [RFC6570](https://tools.ietf.org/html/rfc6570).`
is dirty fix, but covering main cases
@samdark samdark requested a review from arogachev March 24, 2022 14:00
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Alexey Rogachev <[email protected]>
CHANGELOG.md Outdated Show resolved Hide resolved
@arogachev
Copy link
Contributor

Thanks, it's actually 2 fixes in 1, also handles newlines. 👍

@arogachev arogachev self-assigned this Mar 28, 2022
@arogachev arogachev added the type:bug Bug label Mar 28, 2022
@arogachev arogachev modified the milestone: 3.0.3 Mar 28, 2022
@WinterSilence
Copy link
Contributor Author

WinterSilence commented Mar 28, 2022

@arogachev That's method still incorrect. We can detect summary only by first \n\n, but Yii2 don't use PSR-5.

@arogachev
Copy link
Contributor

@WinterSilence Thanks. Moved it to a separate issue for now - #283.

@arogachev
Copy link
Contributor

@WinterSilence Thanks for your contribution! 👍 I additionally checked how it affects current API docs using diffs, didn't find any regression. Need to prepare new release now.

@arogachev arogachev changed the title Lazy fix BaseDoc::extractFirstSentence() Convert newlines to spaces and consider the first sentence ended only if the dot is followed by a space in BaseDoc::extractFirstSentence() Mar 29, 2022
@arogachev arogachev merged commit 000c77b into yiisoft:master Mar 29, 2022
@WinterSilence WinterSilence deleted the patch-1 branch March 29, 2022 07:10
@WinterSilence
Copy link
Contributor Author

@arogachev меня удивляет, что такой популярный и, вышедший много лет назад, фреймворк до сих пор настолько сырой

@arogachev arogachev added this to the 3.0.4 milestone Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants