Page MenuHomePhabricator

Diff view and edit section view ignore whitespace
Closed, ResolvedPublic

Description

The diff 102336099 of page Petriolo is very small. But the page history indicates more than 23,000 bytes added.

image.png (69×981 px, 35 KB)

Indeed, many white spaces have been added in the "Eventi" section.

In diff view, the compared version, there isn't any char added or removed. The extra spaces aren't showing.

image.png (840×1 px, 130 KB)

The white spaces are visible in only in edit mode for the whole page. In the edit view for only the section "Eventi" or "Cultura", the spaces are not visible.

Event Timeline

The edit (and those before) added a lot of spaces, which aren't shown in the diff.

Aklapper renamed this task from Small change but many bytes added to A change shows 23000 bytes added but only a small change in diff view (whitespace changes ignored?).Jan 25 2019, 4:21 PM

The edit (and those before) added a lot of spaces, which aren't shown in the diff.

I can not find these extra spaces in wikitext; maybe they are merged into only one space by MediaWiki when it saves the page into database?

If this is the reason, in my opinion these extra spaces should not be counted in the byte difference.

Interesting, in edit view they are indeed collapsed to just a few spaces, but they definitely are there: Place the cursor after "locali e spettacoli dal vivo.", press Shift+End to select everything to the end of the line, copy and paste somewhere else, e.g. a text editor. Then you will see 26784 spaces.

Interesting, in edit view they are indeed collapsed to just a few spaces, but they definitely are there: Place the cursor after "locali e spettacoli dal vivo.", press Shift+End to select everything to the end of the line, copy and paste somewhere else, e.g. a text editor. Then you will see 26784 spaces.

I can see extra spaces only if I enter in edit mode for the whole page. If I enter in edit view for only the section "Eventi" or "Cultura", the spaces are not visible.

I think both mode (whole page or single section) should be consistent.

Beta16 renamed this task from A change shows 23000 bytes added but only a small change in diff view (whitespace changes ignored?) to Diff view and edit section view ignore whitespace.Jan 28 2019, 11:00 AM
Beta16 updated the task description. (Show Details)
tstarling claimed this task.
tstarling subscribed.

I can see spaces now in the linked diff, they're not collapsed. It was probably a CSS fix. The line exceeds the complexity limit, and so you won't get an intra-line diff for that change, but that is fine. This sort of change is the reason we have limits. The expected behaviour for pathologically long lines is for the lines to be shown but not highlighted.