Page MenuHomePhabricator

Poem extension tag cannot be used semantically inline
Open, Needs TriagePublic


What's the problem:
Currently the POEM extension tag wraps it's content inside a DIV with a "poem" class to handle the modfied line feed behaviour.

This means it cannot be used inside what would semantically descend from a P or SPAN element.

Test case:

This in the relevant portion generates :

<span style="display:block; text-align:center; "><poem>"Aliquam faucibus,
elit ut dictum aliquet,
felis nisl adipiscing sapien,
sed malesuada diam lacus eget erat."</poem></span>

This is translated to

<div class="mw-parser-output"><span style="display:block; text-align:center;"><div class="poem">
<p>"Aliquam faucibus,<br />
elit ut dictum aliquet,<br />
felis nisl adipiscing sapien,<br />
sed malesuada diam lacus eget erat."

which is obviously mis-nested with a DIV inside a SPAN which isn't going to work.

Desired behavior:

Allow POEM tag to have an inline=yes option, that generates a semantically valid SPAN element allowing it's use in the situation encountered in the Wikisource page linked.