Help:Diff/ja

差分は、あるページの 2 つの版間の変更点を表示するものです. 差分は、MediaWiki ウィキにおけるナビゲーションとコンテンツ モデレーションの基本的な構成要素です.

ウィキ エコシステムのプラットフォームでは、どのデバイスとどの MediaWiki のインストレーションが使用されているかによって、差分にいくつかのバージョンがあります.



差分をいつ、なぜ使用するか
差分を使用する主な理由は、あなた自身や他の人が行ったページの特定の変更を確認することです. これを行うには、多くの理由が考えられます:


 * 荒らしの事例を見つけるため
 * 節、文、単語がいつ追加/除去されたかを判断するため
 * どの編集者が変更を行ったかを判断するため
 * 差分にはSpecial:MyLanguage/Help:Editing pages、Special:MyLanguage/Manual:Revertsなどの操作や、編集した人の利用者ページやトークページへのリンクが含まれているため、さらなる操作への出発点として.

How to navigate to view a diff?
The most common way to view a diff is through the "Revision history". This is accessible via the "" tab. From there, you can use "" to view diffs of single revisions, or use the radio buttons and the "" button to view diffs across multiple revisions.

Most special pages that list changes will usually include links to diffs, such as:


 * Special:RecentChanges
 * Special:Watchlist
 * Special:Contributions
 * Special:Relatedchanges

Another way to view a diff is with the Special:Diff page. To use this, you must know the IDs of the revisions you want to compare. Revision IDs can be retrieved by looking at the  portion of a diff URL, where   is the diff ID. Additionally, you can use the value of the  parameter to get the diff of that revision against the previous one.

Components to a diff
Below is a visual representation of the important components of a diff page which you will see when viewing the difference between two published changes.



This example shows the top of the diff page (some of the links are dummy links). The older version is shown on the left, the newer version on the right.



Unchanged text is dark grey on light grey (only parts before and after changed text are shown).



移動されたテキスト
Identical text that has moved from one place to another are usually represented as added and removed text. On MediaWiki installations using, there may be an arrow icon more clearly indicating where the moved text went to.



追加されたテキスト
Lines containing added text have a plus icon (+) before them. The added words and characters are highlighted and in bold.



除去されたテキスト
Lines containing removed text have a minus icon (−) before them. The removed words and characters are highlighted and in bold.



置換されたテキスト
We can see what has been replaced with new content when there's a + icon and a − icon next to the phrase where the change happened.

Paragraphs which have changed are black on white, with an orange border on the old revision side and a blue border on the new version side.

Inserted and removed text is highlighted with the border color and in bold. Where whole paragraphs have been removed or inserted, no highlighting or bolding is applied and the other side is blank.

Linking to a diff
Diffs can be linked to by copying the URL while viewing the diff — this URL has two parameters,  and.

Linking to a diff from outside a wiki can be done by using the full URL, for example:



The diff special page at Special:Diff makes it easier to create shorter URLs which redirect to diffs.

From within a wiki, these links can take the following forms:


 * → Special:Diff/1242287 – 同じページの前の版との差分を表示します.
 * → Special:Diff/1242287/prev – 同じページの前の版との差分を表示します.
 * → Special:Diff/1242287/next – 同じページの次の版との差分を表示します.
 * → Special:Diff/1242287/cur – 同じページの現在の版との差分を表示します.
 * → Special:Diff/1242286/1242287 – 同じページの、指定した 2 版の間の差分を表示します. 指定する版の順序は逆でも構いません. 例:  → Special:Diff/1242287/1242286 (ですが、逆順は避けるべきです).

これらのリンクは、他の内部リンクと同様に編集の要約で使用できます. 例:.

For example, the full URL  could also be written as.

By default, the later revision of the page is displayed in full below the diff — this can be turned off via a preferences ("") or by setting  in the URL. Links to diffs without the page text can be created:



Inline diffs
Since MediaWiki 1.35, an inline diff (also known as a unified diff) is available. this is only available with the engine. Inline diffs can be accessed by passing the  parameter in the URL (example). There are plans to expose a toggle to switch between inline and two-column in the interface (T240608).

How to report bugs?
Bugs should be filed on Phabricator under the tag.

User Preferences
The following user preferences are available in the "" section of the "" preferences tab:


 * Toggle the display of the page text below the diff. This text is the later of the two revisions of the page.
 * Toggle the display of the page text below the diff. This text is the later of the two revisions of the page.


 * Whether to show the diff of the rolled back revision after a rollback.
 * Whether to show the diff of the rolled back revision after a rollback.

Some extensions also add their own preferences related to diffs.