Page MenuHomePhabricator

Paragraph wrapping related roundtripping diff (minor diff, but seemingly common in RT testing failures)
Closed, ResolvedPublic

Description

See the lost newline there before the transclusion. This is being flagged as a semantic RT diff in a lot of pages artificially inflating our RT-testing failures.

[subbu@earth lib] echo "a\n\n\n{{echo|b\n<div>c</div>}}" | node parse --wt2wt
a

{{echo|b
<div>c</div>}}

Seems to be because of the paragraph wrapper pulling that newline into the transclusion. See the <br/> that has ended up in the template output. There doesn't seem to be a nice fix for this since what the p-wrapper is doing seems to be right.

[subbu@earth lib] echo "a\n\n\n{{echo|b\n<div>c</div>}}" | node parse --normalize=parsoid

<p>a</p>
<p typeof="mw:Transclusion" data-mw='{"parts":["\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n&lt;div>c&lt;/div>"}},"i":0}}]}'><br/> b</p>
<div>c</div>

Event Timeline

ssastry raised the priority of this task from to Medium.
ssastry updated the task description. (Show Details)
ssastry added a project: Parsoid.
ssastry subscribed.

This is another case of false positive report of semantic failures.

ssastry set Security to None.
ssastry lowered the priority of this task from Medium to Low.Apr 27 2015, 8:56 PM

The roundtrip classification itself has been addressed now. The actual parse issue is not significant to merit a lot of immediate energy.

Arlolra claimed this task.
Arlolra subscribed.
echo -e "a\n\n\n{{echo|b\n<div>c</div>}}" | php bin/parse.php --wt2wt
a


{{echo|b
<div>c</div>}}