Page MenuHomePhabricator

VisualEditor: MediaWiki <source> used between text nodes should render block instead of inline-block
Open, MediumPublic

Description

Screenshot of MediaWiki rendering

Wikitext:

Example

Foo <code>bar</code> baz.
You'll want to add <source lang="javascript">

"predef": [
        "OO",
]

</source> x y.

In MediaWiki's PHP parser:

<h3>..</h3>
<p>Foo <code>bar</code> baz.</p>
<p>You'll want to add</p>
<div> .. syntax highlgiht ..
<p>x y.</p>

In Parsoid:

<h3>..</h3>
<p>Foo <code>bar</code> baz.</p>
You'll want to add
<div> .. syntax highlgiht ..
x y.

Notice the lack of paragraphs from the Parsoid DOM, though this is odd, it still renders fine visually in browsers.

In VisualEditor:

<h3 class="ve-ce-branchNode">Naming</h3>
<p class="ve-ce-generated-wrapper ve-ce-branchNode">
  You'll want to add&nbsp;
  <span class="ve-ce-leafNode ve-ce-generatedContentNode ve-ce-mwExtensionNode ve-ce-mwAlienExtensionNode ve-ce-protectedNode" contenteditable="false">
    <div dir="ltr" class="mw-geshi mw-code mw-content-ltr" typeof="mw:Extension/source" data-mw=".." about="#mwt24">..</div>
  </span>
  &nbsp;x y.
</p>

It renders as an inline-block within a paragraph, that's where it goes wrong.


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-03-13_at_19.17.30.png (408×634 px, 34 KB)

Details

Reference
bz62609

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:07 AM
bzimport set Reference to bz62609.

Created attachment 14804
Screenshot of VisualEditor rendering

Attached:

Screen_Shot_2014-03-13_at_19.17.37.png (430×994 px, 44 KB)

Created attachment 14805
Screenshot of Parsoid rendering and Parsoid DOM

Attached:

Screen_Shot_2014-03-13_at_19.18.35.png (1×1 px, 262 KB)