Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Use Parsoid data for template names rather than detect from wikitext | mediawiki/extensions/VisualEditor | master | +21 -19 |
Related Objects
Event Timeline
@FDMS I'm new at this, so it's not clear to me what's going on here. Please can you add to this bug:
- The specifics steps to reproduce the problem
- What you would expect to happen
- What actually happens
Thanks!
- Go to any file page that has the default infobox template on it (e.g. File:Berninabahn zwischen Lagalb und Ospizio Bernina im Winter.jpg)
- Open VisualEditor on that page
- Hover over the infobox template and wait for the template tooltip
Expected behaviour: The template's name, "information", should be displayed.
Actual behaviour: The template's name plus a linebreak are displayed.
(This can also be reproduced with Wikipedia infoboxes or any other templates usually occupying more than one source wikitext line.)
The root cause of this is that mw.Title.newFromText() doesn't accept input containing newlines (which is correct and matches PHP Title::newFromText()), so the template name is not formatted prettily. We should be stripping any leading/trailing newlines before.
Change 359074 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Use Parsoid data for template names rather than detect from wikitext
Change 359074 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Use Parsoid data for template names rather than detect from wikitext



