dijs / infobox-parser

Parse Wikipedia Infoboxes
40 stars 18 forks source link

Replace nowrap template with its content #21

Closed petteripitkanen closed 3 years ago

petteripitkanen commented 4 years ago

While trying infobox-parser with another wikitext input, I found some cases where current test data is parsed incorrectly when there is a nowrap template around. The nowrap template instructs to prevent line breaks in its content, this PR replaces nowrap templates with their content in the cleanSource step, and adds assertions for every case of nowrap in the test data. I have marked some of the tests with skip to indicate that there is also some other problem that prevents these cases from being parsed correctly.

dijs commented 4 years ago

Thank you! I will take a look at those other tests