Skip to content

Return longest text after failing to detect text longer than the configured value#423

Merged
gijsk merged 9 commits intomozilla:masterfrom
andreskrey:issue-381-try-to-return-text-after-all-attempts-failed
Feb 27, 2018
Merged

Return longest text after failing to detect text longer than the configured value#423
gijsk merged 9 commits intomozilla:masterfrom
andreskrey:issue-381-try-to-return-text-after-all-attempts-failed

Conversation

@andreskrey
Copy link
Copy Markdown
Contributor

Second attempt at #381. Original PR was #421.

WIP. Will notify once test case is done.

@andreskrey andreskrey changed the title [WIP] Return longest text after failing to detect text longer than the configured value Return longest text after failing to detect text longer than the configured value Feb 26, 2018
@andreskrey
Copy link
Copy Markdown
Contributor Author

@gijsk Ready!

Copy link
Copy Markdown
Contributor

@gijsk gijsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor nit, with that this looks good. Thanks!

Comment thread Readability.js Outdated
});

// But first check if we actually have something
if (this._attempts[0].textLength === 0) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this just if (!this._attempts[0].textLength) ?

@andreskrey
Copy link
Copy Markdown
Contributor Author

Done!

Comment thread Readability.js Outdated

// But first check if we actually have something
if (this._attempts[0].textLength === 0) {
if (this._attempts[0].textLength) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed out the !, which unfortunately is quite important...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I would just fix this myself and land manually, but I'm afraid my github fu is really weak and I'm in the middle of something else right now)

@andreskrey
Copy link
Copy Markdown
Contributor Author

Bah! that's what happens when you try to fix a review quickly before lunch :F

@gijsk gijsk merged commit 834672e into mozilla:master Feb 27, 2018
@andreskrey andreskrey deleted the issue-381-try-to-return-text-after-all-attempts-failed branch February 27, 2018 14:27
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