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

Match headings on trimmed strings to avoid whitespace causing mismatches (Fixes #452) #454

Merged
merged 1 commit into from May 24, 2018

Conversation

gijsk
Copy link
Contributor

@gijsk gijsk commented May 24, 2018

@msujaws this should be fairly easy to review. The HTML changes are just because generate-testcase.js changes some formatting to how the HTML used to be.

The reason we have all this code is to deal with cases where the title is something like "New York Times - Some title", so we remove the generic website name stuff. This code then looks to see if the prefix might actually just be a legit part of the title by checking headings inside the page for the same title. As noted in #452 this fixes the engadget title, but as you can see here it also improves the telegraph testcase, so it seems plausible it'll affect a good number of articles.

@gijsk gijsk merged commit d4b842c into mozilla:master May 24, 2018
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.

None yet

2 participants