Page MenuHomePhabricator

Compare full pages at section API diffs
Closed, ResolvedPublic


[[;1fdfc0e816b5e35eb893b9b5254d9aeb16c1ae5b$3460|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.

Event Timeline

Anomie subscribed.

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.

Change 448160 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] ApiComparePages: Update for MCR

Change 448160 merged by jenkins-bot:
[mediawiki/core@master] ApiComparePages: Update for MCR