From aeffc7979c0174a46abcc04aee536472123325f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 15 Oct 2012 11:04:40 +0000 Subject: [PATCH] Message documentation update for DifferenceEngine Change-Id: I404cbf07238bbe532432bcb9dd573bdec2a95b5e --- includes/diff/DifferenceEngine.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 4ca8263134..f3dc5a3a00 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -714,12 +714,19 @@ class DifferenceEngine extends ContextSource { /** * Generate a diff, no caching. * - * Subclasses may override this to provide a + * This implementation uses generateTextDiffBody() to generate a diff based on the default + * serialization of the given Content objects. This will fail if $old or $new are not + * instances of TextContent. + * + * Subclasses may override this to provide a different rendering for the diff, + * perhaps taking advantage of the content's native form. This is required for all content + * models that are not text based. * * @param $old Content: old content * @param $new Content: new content * * @since 1.21 + * @throws MWException if $old or $new are not instances of TextContent. */ function generateContentDiffBody( Content $old, Content $new ) { if ( !( $old instanceof TextContent ) ) { -- 2.20.1