mozilla / readability

A standalone version of the readability lib
Other
8.34k stars 579 forks source link

Add S and U phrasing elements #876

Open vankov1 opened 3 weeks ago

vankov1 commented 3 weeks ago

S and U should be part of the phrasing elements list: https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content

Leaving them out causes <p> elements to be placed within <u> or <s> like in the hukumusume test case, which is invalid.

P.S. I'm not sure how the test case should be handled, its expected.html is not correct.

inhumantsar commented 3 weeks ago

@vankov1 you can run node generate-testcase.js hukumusume to regenerate expected.html and expected-metadata.json