Compare full pages at section API diffs
Open, Needs TriagePublic

Description

EditPage->showDiff() extends the section diffs to the whole page, while API action=query&prop=revisions with rvsection doesn’t. They should provide the same output, as “live preview”, supposed to be equivalent to the normal, uses the latter. It has little, but some impact: the line numbers are different, the previous section’s last two or the next section’s first two lines are not shown (if the beginning or end of the edited section is modified), also some pre-save transform cleanup (so that there will be exactly one blank line after the section) is hidden.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 25 2018, 10:53 PM
Anomie added a subscriber: Anomie.

Diffs using action=query&prop=revisions are deprecated and will not be improved, see T164106. Use action=compare instead.

The change suggested here doesn't make sense for action=compare. If behavior of taking a section and inserting it into the full page before performing the diff is wanted, an option to explicitly request that behavior would be needed.

As for whether LivePreview should actually do as you suggest, I leave that to others to determine.

Krinkle moved this task from Backlog to API on the MediaWiki-Page-editing board.Apr 12 2018, 4:09 PM