spencermountain/wtf_wikipedia

template text removed from sections

rg3h opened this issue · 4 comments

rg3h commented

I am not sure if this is a bug or an unavoidable effect from templates.
For wikipedia entry December_30 there is a line item in the event section:

  • 2006 – The Indonesian passenger ferry {{MV|Senopati Nusantara}} sinks in a storm, resulting in at least 400 deaths.

In Section.js the constructor calls parseTemplates() which appears to remove the {{...}} and so the name of the ferry is lost and the results become: The Indonesian passenger ferry sinks in a storm, resulting in at least 400 deaths.

I am wondering if it is possible to have the text "Senopati Nusantara" retained?

hey rich - good find. Looks like we've missed a few ship templates
I'll add these to the next release, but in the meantime, you can do this:

wtf.extend((models, templates) => {
  templates.mv = 0 // support this new template
})

https://runkit.com/spencermountain/63b1ffef955fc900081d3304
cheers

rg3h commented

hey Rich, this should be working now in 10.1.1
lemme know if you spot any others. Thanks

rg3h commented