Page MenuHomePhabricator

Parsoid matches closing *include* tags differently than legacy causing edge case rendering diffs in some cases
Closed, ResolvedPublic

Event Timeline

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

Still looking but this may be an edge case because of script / syntax error on the page which prevents the "{{Documentation}}" string from getting tokenized properly in the PEG which then causes it not to be displayed.

There is an unclosed <includeonly> tag on the page which is causing this problem - the wikitext needs to be fixed. Looks like legacy parser resets some state (maybe when it encounters a <noinclude>). We could see if we want to institute some of that error correction in Parsoid, but this is not a blocker for deploy. We should probably fix up the page and be done with it.

Ah, looks like the issue is more about <includeonly>foo<includeonly>bar</includeonly>baz<noinclude>xyz</noinclude> as seen on this page. Looks like with legacy output, it matches the </includeonly> with the outer <includeonly> whereas Parsoid seems to match it with the inner <includeonly>.

Maybe Parsoid should have the same error handling.

ssastry renamed this task from Rendering diff on template page (visual diff testing) to Parsoid matches closing *include* tags differently than legacy causing edge case rendering diffs in some cases.Aug 26 2024, 7:38 PM
ssastry subscribed.

I wonder if we should just fix the wikitext and call it done.

Ah, looks like the issue is more about <includeonly>foo<includeonly>bar</includeonly>baz<noinclude>xyz</noinclude> as seen on this page. Looks like with legacy output, it matches the </includeonly> with the outer <includeonly> whereas Parsoid seems to match it with the inner <includeonly>.

Maybe Parsoid should have the same error handling.

The test page was fixed by T373776 / Ied9ed72be7bbff6d7f323109bc0043f1aa0f4b70 and renders the same now.

I wonder if we should just fix the wikitext and call it done.

The diff that remains is another issue that needs investigating