-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: SUMMARY_MAX_PARAGRAPHS
not respected in some combinations with SUMMARY_MAX_LENGTH
#3427
fix: SUMMARY_MAX_PARAGRAPHS
not respected in some combinations with SUMMARY_MAX_LENGTH
#3427
Conversation
77cf90a
to
8a7c437
Compare
Thank you, Scott, for submitting this pull request — replete with a test, no less! ✨ Given the narrow scope of these changes, I think a release type of @gagath: As the original author of the |
When, for example, the content is 2 paragraphs, each consisting of 30 words, and SUMMARY_MAX_PARAGRAPHS=1 and SUMMARY_MAX_LENGTH=50, the current behavior produces a summary with 50 words and 2 paragraphs, effectively ignoring SUMMARY_MAX_PARAGRAPHS. This change inverts this behavior: the resulting summary from the above situation will consist of the entire first 30 word paragraph. In the case where the first paragraph(s) is longer than SUMMARY_MAX_LENGTH, the summary will still be truncated to that length. This change brings the actual behavior in line with the documented behavior.
8a7c437
to
4c36daf
Compare
@justinmayer no problem, changed the release type in the latest version! |
Hello @justinmayer and @scolby33, this change looks good to me and indeed fixes an implementation error of |
SUMMARY_MAX_PARAGRAPHS
not respected in some combinations with SUMMARY_MAX_LENGTH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@justinmayer not relevant to the PR but @scolby33 and I are flatmates and we thought it was funny we both had random PRs for two of your different projects back to back. Cheers! |
No way! 😮 That is indeed quite funny — literally laughed out loud when I read it. It’s been a pleasure. I hope there will be more random open-source encounters with y’all in the future. If you’re ever in the Italian Alps, beers are on me! 🍻 |
When, for example, the content is 2 paragraphs, each consisting of 30 words, and
SUMMARY_MAX_PARAGRAPHS=1
andSUMMARY_MAX_LENGTH=50
, the current behavior produces a summary with 50 words and 2 paragraphs, effectively ignoringSUMMARY_MAX_PARAGRAPHS
.This change inverts this behavior: the resulting summary from the above situation will consist of the entire first 30 word paragraph.
In the case where the first paragraph(s) is longer than
SUMMARY_MAX_LENGTH
, the summary will still be truncated to that length.This change brings the actual behavior in line with the documented behavior.
Pull Request Checklist
Updated documentation for changed codeno need for documentation changes