Page MenuHomePhabricator

Leading whitespace in Phonos tag parsed as code block
Closed, ResolvedPublic

Description

example wikitext
Test with #tag magic word ({{#tag:phonos| test|file=Colonel Bogey.ogg}}).

Test with direct tag syntax (<phonos file="Colonel Bogey.ogg"> test</phonos>).

(There are blank lines between these three sentences – shouldn’t each become a paragraph? But that might be unrelated.)

Produces (permalink):

image.png (588×1 px, 57 KB)

Or, in articles (diff):

image.png (1×2 px, 256 KB)

image.png (908×2 px, 135 KB)

Is this expected (and templates like {{audio}} should trim the wikitext before they pass it into Phonos), or should Phonos behave differently?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
MusikAnimal subscribed.

I think leading and trailing spaces are typically removed. I'm kind of surprised this didn't happen "automatically". Anyway, easy fix. Patch incoming

Change 966297 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/Phonos@master] Phonos: trim whitespace from label before parsing

https://gerrit.wikimedia.org/r/966297

Change 966297 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Phonos: trim whitespace from label before parsing

https://gerrit.wikimedia.org/r/966297