r106014 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106013‎ | r106014 | r106015 >
Date:11:18, 13 December 2011
Author:gwicke
Status:deferred
Tags:
Comment:
Replace custom object copy with $.extend.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/parser/ext.core.QuoteTransformer.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/parser/ext.core.QuoteTransformer.js
@@ -26,15 +26,9 @@
2727 }, 'tag', 'QUOTE' );
2828 };
2929
30 -// Extract a copy of the token context with the info we need
31 -// XXX: Should probably use a generic shallow object copy
 30+// Make a copy of the token context
3231 QuoteTransformer.prototype.ctx = function ( tokenCTX ) {
33 - return {
34 - accum: tokenCTX.accum,
35 - token: tokenCTX.token,
36 - lastToken: tokenCTX.lastToken,
37 - pos: tokenCTX.pos
38 - };
 32+ return $.extend({}, tokenCTX);
3933 };
4034
4135 // Handle QUOTE tags. These are collected in italic/bold lists depending on

Status & tagging log