Page MenuHomePhabricator

Space added for no reason
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

What happens?:

  • Wikitrapper template content, when viewed on the first page, is slightly misaligned due to extra spaces internally added for no reason
  • In its page (the latter one) the template is displayed correctly, with or without Parsoid

What should have happened instead?:
No extra space added, as it happens without using Parsoid

Related Objects

Mentioned In
T423241: Thumbtime for TimedMedia no longer working
T423701: Serialize ContentHolder (or at least its fragments) in ParserOutput
T373384: Parsoid doesn't properly handle double-underscore magic words
T425731: CTT tasks week of 2026-05-01
T425056: 1.46.0-wmf.26 broke itwiki's Template:Divisa calcio
T425107: __TOC__ not showing up in Parsoid on Norwegian Bokmål village pump pages
T425008: WrapSectionState crash: Wikimedia\Assert\InvariantException: Invariant failed: Expected only language variants to be missing about ids.
T420336: mw-parsoid improvements
T319058: ParserTests defaults to wgAllowExternalImages=true
T424773: __NOCONTENTCONVERT__ is not honored in Parsoid
T368724: Rendering diff on broken link with template (visual diff testing)
Mentioned Here
T319058: ParserTests defaults to wgAllowExternalImages=true
T368724: Rendering diff on broken link with template (visual diff testing)
T373384: Parsoid doesn't properly handle double-underscore magic words
T420336: mw-parsoid improvements
T423241: Thumbtime for TimedMedia no longer working
T423701: Serialize ContentHolder (or at least its fragments) in ParserOutput
T424773: __NOCONTENTCONVERT__ is not honored in Parsoid
T425008: WrapSectionState crash: Wikimedia\Assert\InvariantException: Invariant failed: Expected only language variants to be missing about ids.
T425056: 1.46.0-wmf.26 broke itwiki's Template:Divisa calcio
T425107: __TOC__ not showing up in Parsoid on Norwegian Bokmål village pump pages
T425731: CTT tasks week of 2026-05-01

Event Timeline

Change #1277268 had a related patch set uploaded (by Ayush8620; author: Ayush8620):

[mediawiki/services/parsoid@master] Parsoid: Prevent paragraph wrapping near mw:Transclusion boundaries

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

Ayush8620 subscribed.

Uploaded a patch to Gerrit to address this issue:

Review here

The fix prevents ParagraphWrapper from inserting synthetic <p> and <br> tokens
when buffered newlines occur adjacent to mw:Transclusion boundary markers.

This restores correct alignment for ASCII-art templates such as {{wikitrappen}}
during transclusion and matches legacy parser behavior.

Feedback is welcome.

Ayush8620 changed the task status from Open to In Progress.Apr 27 2026, 12:10 PM

Change #1281784 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/services/parsoid@master] Fix a corner case in table attribute parsing

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

@SomeRandomDeveloper I have a patch which is probably correct (well, that's for a reviewer to decide), but if you want to discuss it I'm happy to :)

Change #1281784 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Fix a corner case in table attribute parsing

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

Change #1284813 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.24.0-a2

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

Change #1284813 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.24.0-a2

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

Change #1284832 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/vendor@wmf/1.47.0-wmf.1] Bump wikimedia/parsoid to 0.24.0-a2

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

Change #1284832 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.47.0-wmf.1] Bump wikimedia/parsoid to 0.24.0-a2

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

Mentioned in SAL (#wikimedia-operations) [2026-05-07T21:15:34Z] <cscott@deploy1003> Started scap sync-world: Backport for [[gerrit:1284828|Upgrading webonyx/graphql-php (v15.31.5 => v15.32.3)]], [[gerrit:1284834|composer.json: Update webonyx/graphql-php to ^15.32.3]], [[gerrit:1284832|Bump wikimedia/parsoid to 0.24.0-a2 (T319058 T368724 T373384 T420336 T423241 T423701 T424446 T424773 T425008 T425056 T425107 T425731)]], [[gerrit:1284837|Bump wikimedia/parsoid to 0.24.0-a2 (T425731)]

Mentioned in SAL (#wikimedia-operations) [2026-05-07T21:27:35Z] <cscott@deploy1003> Finished scap sync-world: Backport for [[gerrit:1284828|Upgrading webonyx/graphql-php (v15.31.5 => v15.32.3)]], [[gerrit:1284834|composer.json: Update webonyx/graphql-php to ^15.32.3]], [[gerrit:1284832|Bump wikimedia/parsoid to 0.24.0-a2 (T319058 T368724 T373384 T420336 T423241 T423701 T424446 T424773 T425008 T425056 T425107 T425731)]], [[gerrit:1284837|Bump wikimedia/parsoid to 0.24.0-a2 (T425731)

Change #1277268 abandoned by Arlolra:

[mediawiki/services/parsoid@master] Parsoid: Prevent paragraph wrapping near mw:Transclusion boundaries

Reason:

T424446 has now been resolved

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