Page MenuHomePhabricator

Dirty diff: Single additional trailing whitespace added to several discussion tools edits in last 3+ weeks
Closed, ResolvedPublic

Description

The diffs can be reproduced with this script:

cat <<EOF > /tmp/wt
: a
:: b
:* c
::: FOO
EOF
php bin/parse.php < /tmp/wt > /tmp/old.html
sed 's/FOO/d/g;' < /tmp/old.html > /tmp/new.html
php bin/parse.php --oldtextfile /tmp/wt --html2wt --selser --oldhtmlfile /tmp/old.html< /tmp/new.html > /tmp/wt.new
diff /tmp/wt /tmp/wt.new
  • This diff is only possible with v0.13.0-a13 and later which is when we introduced span wrapping around text nodes in list items.
  • The diff goes away if the :* on the 3rd line becomes a ::.
  • The diff goes away if the leading : a is removed
  • The diff goes away if the leading : a\n:: b is changed to : a

Instances:

Event Timeline

ssastry triaged this task as Medium priority.Dec 10 2020, 11:31 PM
ssastry created this task.
ssastry renamed this task from Dirty diff: Single additional whitespace added several discussion tools edits in last 3+ weeks to Dirty diff: Single additional trailing whitespace added to several discussion tools edits in last 3+ weeks.Dec 10 2020, 11:31 PM

Change 647858 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] WIP: Followup to 864d3c55: More incorrect recovery of trimmed whitespace

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

Change 647858 merged by jenkins-bot:
[mediawiki/services/parsoid@master] More fixing of bogus recovery of trimmed whitespace

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

Change 649428 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a20

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

Change 649428 merged by jenkins-bot:
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a20

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