jenkins-bot has submitted this change and it was merged.

Change subject: [jscs] Enforce disallowSpaceAfterObjectKeys
......................................................................


[jscs] Enforce disallowSpaceAfterObjectKeys

 * This was auto-corrected with jscs -x .

Change-Id: Iba32bf7cf4ed9c255b4b84bce3a6295abf414916
---
M .jscsrc
M api/routes.js
M lib/ext.core.ListHandler.js
M lib/ext.core.Sanitizer.js
M lib/jsutils.js
M lib/linter.js
M lib/mediawiki.DOMUtils.js
M lib/mediawiki.SelectiveSerializer.js
M lib/mediawiki.TokenTransformManager.js
M lib/mediawiki.Util.js
M lib/mediawiki.WikiConfig.js
M lib/mediawiki.wikitext.constants.js
M lib/pegTokenizer.pegjs.txt
M tests/server/importJson.js
M tests/server/server.js
15 files changed, 467 insertions(+), 465 deletions(-)

Approvals:
  Cscott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.jscsrc b/.jscsrc
index 88653e6..c03b0d7 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -1,15 +1,7 @@
 {
        "preset": "node-style-guide",
 
-       "disallowMixedSpacesAndTabs": null,
-       "disallowMultipleVarDecl": null,
-       "disallowQuotedKeysInObjects": null,
-       "disallowSpaceAfterObjectKeys": null,
-       "disallowSpacesInsideParentheses": null,
-       "maximumLineLength": null,
-       "requireCamelCaseOrUpperCaseIdentifiers": null,
-       "requireCapitalizedComments": null,
-       "requireCapitalizedConstructors": null,
+       // Preserve these exceptions, they codify what we're already doing.
        "requireCurlyBraces": [
                "if",
                "else",
@@ -19,6 +11,16 @@
                "try",
                "catch"
        ],
+
+       // We'd like to eliminate these at some point, to conform with the 
preset.
+       "disallowMixedSpacesAndTabs": null,
+       "disallowMultipleVarDecl": null,
+       "disallowQuotedKeysInObjects": null,
+       "disallowSpacesInsideParentheses": null,
+       "maximumLineLength": null,
+       "requireCamelCaseOrUpperCaseIdentifiers": null,
+       "requireCapitalizedComments": null,
+       "requireCapitalizedConstructors": null,
        "requireTrailingComma": null,
        "validateIndentation": null,
        "validateQuoteMarks": null,
diff --git a/api/routes.js b/api/routes.js
index a086d32..3f3db08 100644
--- a/api/routes.js
+++ b/api/routes.js
@@ -604,14 +604,14 @@
 routes.redirectOldStyle = function( req, res ) {
        if ( req.params[0] ) {
                apiUtils.relativeRedirect({
-                       "path" : '/' + req.params[0] + req.params[1] + '/' + 
req.params[2],
-                       "res" : res,
-                       "code" : 301
+                       "path": '/' + req.params[0] + req.params[1] + '/' + 
req.params[2],
+                       "res": res,
+                       "code": 301
                });
        } else {
                apiUtils.relativeRedirect({
-                       "path" : '/' + req.params[1] + '/' + req.params[2],
-                       "res" : res,
+                       "path": '/' + req.params[1] + '/' + req.params[2],
+                       "res": res,
                        "code": 301
                });
        }
diff --git a/lib/ext.core.ListHandler.js b/lib/ext.core.ListHandler.js
index 69fab6f..e4838a0 100644
--- a/lib/ext.core.ListHandler.js
+++ b/lib/ext.core.ListHandler.js
@@ -36,11 +36,11 @@
 
 function newListFrame() {
        return {
-               atEOL    : true, // flag indicating a list-less line that 
terminates a list block
-               nlTk     : null, // NlTk that triggered atEOL
+               atEOL: true, // flag indicating a list-less line that 
terminates a list block
+               nlTk: null, // NlTk that triggered atEOL
                solTokens: [],
-               bstack   : [], // Bullet stack, previous element's listStyle
-               endtags  : [], // Stack of end tags
+               bstack: [], // Bullet stack, previous element's listStyle
+               endtags: [], // Stack of end tags
                // Partial DOM building heuristic
                // # of open block tags encountered within list context
                numOpenBlockTags: 0,
diff --git a/lib/ext.core.Sanitizer.js b/lib/ext.core.Sanitizer.js
index de9a108..8bb0e8c 100644
--- a/lib/ext.core.Sanitizer.js
+++ b/lib/ext.core.Sanitizer.js
@@ -68,259 +68,259 @@
         * @private
         */
        htmlEntities: {
-               'Aacute'   : 193,
-               'aacute'   : 225,
-               'Acirc'    : 194,
-               'acirc'    : 226,
-               'acute'    : 180,
-               'AElig'    : 198,
-               'aelig'    : 230,
-               'Agrave'   : 192,
-               'agrave'   : 224,
-               'alefsym'  : 8501,
-               'Alpha'    : 913,
-               'alpha'    : 945,
-               'amp'      : 38,
-               'and'      : 8743,
-               'ang'      : 8736,
-               'apos'     : 39, // New in XHTML & HTML 5; avoid in output for 
compatibility with IE.
-               'Aring'    : 197,
-               'aring'    : 229,
-               'asymp'    : 8776,
-               'Atilde'   : 195,
-               'atilde'   : 227,
-               'Auml'     : 196,
-               'auml'     : 228,
-               'bdquo'    : 8222,
-               'Beta'     : 914,
-               'beta'     : 946,
-               'brvbar'   : 166,
-               'bull'     : 8226,
-               'cap'      : 8745,
-               'Ccedil'   : 199,
-               'ccedil'   : 231,
-               'cedil'    : 184,
-               'cent'     : 162,
-               'Chi'      : 935,
-               'chi'      : 967,
-               'circ'     : 710,
-               'clubs'    : 9827,
-               'cong'     : 8773,
-               'copy'     : 169,
-               'crarr'    : 8629,
-               'cup'      : 8746,
-               'curren'   : 164,
-               'dagger'   : 8224,
-               'Dagger'   : 8225,
-               'darr'     : 8595,
-               'dArr'     : 8659,
-               'deg'      : 176,
-               'Delta'    : 916,
-               'delta'    : 948,
-               'diams'    : 9830,
-               'divide'   : 247,
-               'Eacute'   : 201,
-               'eacute'   : 233,
-               'Ecirc'    : 202,
-               'ecirc'    : 234,
-               'Egrave'   : 200,
-               'egrave'   : 232,
-               'empty'    : 8709,
-               'emsp'     : 8195,
-               'ensp'     : 8194,
-               'Epsilon'  : 917,
-               'epsilon'  : 949,
-               'equiv'    : 8801,
-               'Eta'      : 919,
-               'eta'      : 951,
-               'ETH'      : 208,
-               'eth'      : 240,
-               'Euml'     : 203,
-               'euml'     : 235,
-               'euro'     : 8364,
-               'exist'    : 8707,
-               'fnof'     : 402,
-               'forall'   : 8704,
-               'frac12'   : 189,
-               'frac14'   : 188,
-               'frac34'   : 190,
-               'frasl'    : 8260,
-               'Gamma'    : 915,
-               'gamma'    : 947,
-               'ge'       : 8805,
-               'gt'       : 62,
-               'harr'     : 8596,
-               'hArr'     : 8660,
-               'hearts'   : 9829,
-               'hellip'   : 8230,
-               'Iacute'   : 205,
-               'iacute'   : 237,
-               'Icirc'    : 206,
-               'icirc'    : 238,
-               'iexcl'    : 161,
-               'Igrave'   : 204,
-               'igrave'   : 236,
-               'image'    : 8465,
-               'infin'    : 8734,
-               'int'      : 8747,
-               'Iota'     : 921,
-               'iota'     : 953,
-               'iquest'   : 191,
-               'isin'     : 8712,
-               'Iuml'     : 207,
-               'iuml'     : 239,
-               'Kappa'    : 922,
-               'kappa'    : 954,
-               'Lambda'   : 923,
-               'lambda'   : 955,
-               'lang'     : 9001,
-               'laquo'    : 171,
-               'larr'     : 8592,
-               'lArr'     : 8656,
-               'lceil'    : 8968,
-               'ldquo'    : 8220,
-               'le'       : 8804,
-               'lfloor'   : 8970,
-               'lowast'   : 8727,
-               'loz'      : 9674,
-               'lrm'      : 8206,
-               'lsaquo'   : 8249,
-               'lsquo'    : 8216,
-               'lt'       : 60,
-               'macr'     : 175,
-               'mdash'    : 8212,
-               'micro'    : 181,
-               'middot'   : 183,
-               'minus'    : 8722,
-               'Mu'       : 924,
-               'mu'       : 956,
-               'nabla'    : 8711,
-               'nbsp'     : 160,
-               'ndash'    : 8211,
-               'ne'       : 8800,
-               'ni'       : 8715,
-               'not'      : 172,
-               'notin'    : 8713,
-               'nsub'     : 8836,
-               'Ntilde'   : 209,
-               'ntilde'   : 241,
-               'Nu'       : 925,
-               'nu'       : 957,
-               'Oacute'   : 211,
-               'oacute'   : 243,
-               'Ocirc'    : 212,
-               'ocirc'    : 244,
-               'OElig'    : 338,
-               'oelig'    : 339,
-               'Ograve'   : 210,
-               'ograve'   : 242,
-               'oline'    : 8254,
-               'Omega'    : 937,
-               'omega'    : 969,
-               'Omicron'  : 927,
-               'omicron'  : 959,
-               'oplus'    : 8853,
-               'or'       : 8744,
-               'ordf'     : 170,
-               'ordm'     : 186,
-               'Oslash'   : 216,
-               'oslash'   : 248,
-               'Otilde'   : 213,
-               'otilde'   : 245,
-               'otimes'   : 8855,
-               'Ouml'     : 214,
-               'ouml'     : 246,
-               'para'     : 182,
-               'part'     : 8706,
-               'permil'   : 8240,
-               'perp'     : 8869,
-               'Phi'      : 934,
-               'phi'      : 966,
-               'Pi'       : 928,
-               'pi'       : 960,
-               'piv'      : 982,
-               'plusmn'   : 177,
-               'pound'    : 163,
-               'prime'    : 8242,
-               'Prime'    : 8243,
-               'prod'     : 8719,
-               'prop'     : 8733,
-               'Psi'      : 936,
-               'psi'      : 968,
-               'quot'     : 34,
-               'radic'    : 8730,
-               'rang'     : 9002,
-               'raquo'    : 187,
-               'rarr'     : 8594,
-               'rArr'     : 8658,
-               'rceil'    : 8969,
-               'rdquo'    : 8221,
-               'real'     : 8476,
-               'reg'      : 174,
-               'rfloor'   : 8971,
-               'Rho'      : 929,
-               'rho'      : 961,
-               'rlm'      : 8207,
-               'rsaquo'   : 8250,
-               'rsquo'    : 8217,
-               'sbquo'    : 8218,
-               'Scaron'   : 352,
-               'scaron'   : 353,
-               'sdot'     : 8901,
-               'sect'     : 167,
-               'shy'      : 173,
-               'Sigma'    : 931,
-               'sigma'    : 963,
-               'sigmaf'   : 962,
-               'sim'      : 8764,
-               'spades'   : 9824,
-               'sub'      : 8834,
-               'sube'     : 8838,
-               'sum'      : 8721,
-               'sup'      : 8835,
-               'sup1'     : 185,
-               'sup2'     : 178,
-               'sup3'     : 179,
-               'supe'     : 8839,
-               'szlig'    : 223,
-               'Tau'      : 932,
-               'tau'      : 964,
-               'there4'   : 8756,
-               'Theta'    : 920,
-               'theta'    : 952,
-               'thetasym' : 977,
-               'thinsp'   : 8201,
-               'THORN'    : 222,
-               'thorn'    : 254,
-               'tilde'    : 732,
-               'times'    : 215,
-               'trade'    : 8482,
-               'Uacute'   : 218,
-               'uacute'   : 250,
-               'uarr'     : 8593,
-               'uArr'     : 8657,
-               'Ucirc'    : 219,
-               'ucirc'    : 251,
-               'Ugrave'   : 217,
-               'ugrave'   : 249,
-               'uml'      : 168,
-               'upsih'    : 978,
-               'Upsilon'  : 933,
-               'upsilon'  : 965,
-               'Uuml'     : 220,
-               'uuml'     : 252,
-               'weierp'   : 8472,
-               'Xi'       : 926,
-               'xi'       : 958,
-               'Yacute'   : 221,
-               'yacute'   : 253,
-               'yen'      : 165,
-               'Yuml'     : 376,
-               'yuml'     : 255,
-               'Zeta'     : 918,
-               'zeta'     : 950,
-               'zwj'      : 8205,
-               'zwnj'     : 8204
+               'Aacute':   193,
+               'aacute':   225,
+               'Acirc':    194,
+               'acirc':    226,
+               'acute':    180,
+               'AElig':    198,
+               'aelig':    230,
+               'Agrave':   192,
+               'agrave':   224,
+               'alefsym':  8501,
+               'Alpha':    913,
+               'alpha':    945,
+               'amp':      38,
+               'and':      8743,
+               'ang':      8736,
+               'apos':     39, // New in XHTML & HTML 5; avoid in output for 
compatibility with IE.
+               'Aring':    197,
+               'aring':    229,
+               'asymp':    8776,
+               'Atilde':   195,
+               'atilde':   227,
+               'Auml':     196,
+               'auml':     228,
+               'bdquo':    8222,
+               'Beta':     914,
+               'beta':     946,
+               'brvbar':   166,
+               'bull':     8226,
+               'cap':      8745,
+               'Ccedil':   199,
+               'ccedil':   231,
+               'cedil':    184,
+               'cent':     162,
+               'Chi':      935,
+               'chi':      967,
+               'circ':     710,
+               'clubs':    9827,
+               'cong':     8773,
+               'copy':     169,
+               'crarr':    8629,
+               'cup':      8746,
+               'curren':   164,
+               'dagger':   8224,
+               'Dagger':   8225,
+               'darr':     8595,
+               'dArr':     8659,
+               'deg':      176,
+               'Delta':    916,
+               'delta':    948,
+               'diams':    9830,
+               'divide':   247,
+               'Eacute':   201,
+               'eacute':   233,
+               'Ecirc':    202,
+               'ecirc':    234,
+               'Egrave':   200,
+               'egrave':   232,
+               'empty':    8709,
+               'emsp':     8195,
+               'ensp':     8194,
+               'Epsilon':  917,
+               'epsilon':  949,
+               'equiv':    8801,
+               'Eta':      919,
+               'eta':      951,
+               'ETH':      208,
+               'eth':      240,
+               'Euml':     203,
+               'euml':     235,
+               'euro':     8364,
+               'exist':    8707,
+               'fnof':     402,
+               'forall':   8704,
+               'frac12':   189,
+               'frac14':   188,
+               'frac34':   190,
+               'frasl':    8260,
+               'Gamma':    915,
+               'gamma':    947,
+               'ge':       8805,
+               'gt':       62,
+               'harr':     8596,
+               'hArr':     8660,
+               'hearts':   9829,
+               'hellip':   8230,
+               'Iacute':   205,
+               'iacute':   237,
+               'Icirc':    206,
+               'icirc':    238,
+               'iexcl':    161,
+               'Igrave':   204,
+               'igrave':   236,
+               'image':    8465,
+               'infin':    8734,
+               'int':      8747,
+               'Iota':     921,
+               'iota':     953,
+               'iquest':   191,
+               'isin':     8712,
+               'Iuml':     207,
+               'iuml':     239,
+               'Kappa':    922,
+               'kappa':    954,
+               'Lambda':   923,
+               'lambda':   955,
+               'lang':     9001,
+               'laquo':    171,
+               'larr':     8592,
+               'lArr':     8656,
+               'lceil':    8968,
+               'ldquo':    8220,
+               'le':       8804,
+               'lfloor':   8970,
+               'lowast':   8727,
+               'loz':      9674,
+               'lrm':      8206,
+               'lsaquo':   8249,
+               'lsquo':    8216,
+               'lt':       60,
+               'macr':     175,
+               'mdash':    8212,
+               'micro':    181,
+               'middot':   183,
+               'minus':    8722,
+               'Mu':       924,
+               'mu':       956,
+               'nabla':    8711,
+               'nbsp':     160,
+               'ndash':    8211,
+               'ne':       8800,
+               'ni':       8715,
+               'not':      172,
+               'notin':    8713,
+               'nsub':     8836,
+               'Ntilde':   209,
+               'ntilde':   241,
+               'Nu':       925,
+               'nu':       957,
+               'Oacute':   211,
+               'oacute':   243,
+               'Ocirc':    212,
+               'ocirc':    244,
+               'OElig':    338,
+               'oelig':    339,
+               'Ograve':   210,
+               'ograve':   242,
+               'oline':    8254,
+               'Omega':    937,
+               'omega':    969,
+               'Omicron':  927,
+               'omicron':  959,
+               'oplus':    8853,
+               'or':       8744,
+               'ordf':     170,
+               'ordm':     186,
+               'Oslash':   216,
+               'oslash':   248,
+               'Otilde':   213,
+               'otilde':   245,
+               'otimes':   8855,
+               'Ouml':     214,
+               'ouml':     246,
+               'para':     182,
+               'part':     8706,
+               'permil':   8240,
+               'perp':     8869,
+               'Phi':      934,
+               'phi':      966,
+               'Pi':       928,
+               'pi':       960,
+               'piv':      982,
+               'plusmn':   177,
+               'pound':    163,
+               'prime':    8242,
+               'Prime':    8243,
+               'prod':     8719,
+               'prop':     8733,
+               'Psi':      936,
+               'psi':      968,
+               'quot':     34,
+               'radic':    8730,
+               'rang':     9002,
+               'raquo':    187,
+               'rarr':     8594,
+               'rArr':     8658,
+               'rceil':    8969,
+               'rdquo':    8221,
+               'real':     8476,
+               'reg':      174,
+               'rfloor':   8971,
+               'Rho':      929,
+               'rho':      961,
+               'rlm':      8207,
+               'rsaquo':   8250,
+               'rsquo':    8217,
+               'sbquo':    8218,
+               'Scaron':   352,
+               'scaron':   353,
+               'sdot':     8901,
+               'sect':     167,
+               'shy':      173,
+               'Sigma':    931,
+               'sigma':    963,
+               'sigmaf':   962,
+               'sim':      8764,
+               'spades':   9824,
+               'sub':      8834,
+               'sube':     8838,
+               'sum':      8721,
+               'sup':      8835,
+               'sup1':     185,
+               'sup2':     178,
+               'sup3':     179,
+               'supe':     8839,
+               'szlig':    223,
+               'Tau':      932,
+               'tau':      964,
+               'there4':   8756,
+               'Theta':    920,
+               'theta':    952,
+               'thetasym': 977,
+               'thinsp':   8201,
+               'THORN':    222,
+               'thorn':    254,
+               'tilde':    732,
+               'times':    215,
+               'trade':    8482,
+               'Uacute':   218,
+               'uacute':   250,
+               'uarr':     8593,
+               'uArr':     8657,
+               'Ucirc':    219,
+               'ucirc':    251,
+               'Ugrave':   217,
+               'ugrave':   249,
+               'uml':      168,
+               'upsih':    978,
+               'Upsilon':  933,
+               'upsilon':  965,
+               'Uuml':     220,
+               'uuml':     252,
+               'weierp':   8472,
+               'Xi':       926,
+               'xi':       958,
+               'Yacute':   221,
+               'yacute':   253,
+               'yen':      165,
+               'Yuml':     376,
+               'yuml':     255,
+               'Zeta':     918,
+               'zeta':     950,
+               'zwj':      8205,
+               'zwnj':     8204,
        },
 
        UTF8_REPLACEMENT: "\xef\xbf\xbd",
@@ -418,141 +418,141 @@
                        // See: http://www.w3.org/TR/html4/
                        return {
                                // 7.5.4
-                               'div'        : block,
-                               'center'     : common, // deprecated
-                               'span'       : block,  // ??
+                               'div':    block,
+                               'center': common, // deprecated
+                               'span':   block,  // ??
 
                                // 7.5.5
-                               'h1'         : block,
-                               'h2'         : block,
-                               'h3'         : block,
-                               'h4'         : block,
-                               'h5'         : block,
-                               'h6'         : block,
+                               'h1': block,
+                               'h2': block,
+                               'h3': block,
+                               'h4': block,
+                               'h5': block,
+                               'h6': block,
 
                                // 7.5.6
                                // address
 
                                // 8.2.4
-                               'bdo'        : common,
+                               'bdo': common,
 
                                // 9.2.1
-                               'em'         : common,
-                               'strong'     : common,
-                               'cite'       : common,
-                               'dfn'        : common,
-                               'code'       : common,
-                               'samp'       : common,
-                               'kbd'        : common,
-                               'var'        : common,
-                               'abbr'       : common,
+                               'em':     common,
+                               'strong': common,
+                               'cite':   common,
+                               'dfn':    common,
+                               'code':   common,
+                               'samp':   common,
+                               'kbd':    common,
+                               'var':    common,
+                               'abbr':   common,
                                // acronym
 
                                // 9.2.2
-                               'blockquote' : common.concat( [ 'cite' ]),
-                               'q'          : common.concat( [ 'cite' ]),
+                               'blockquote': common.concat( [ 'cite' ]),
+                               'q': common.concat( [ 'cite' ]),
 
                                // 9.2.3
-                               'sub'        : common,
-                               'sup'        : common,
+                               'sub': common,
+                               'sup': common,
 
                                // 9.3.1
-                               'p'          : block,
+                               'p': block,
 
                                // 9.3.2
-                               'br'         : [ 'id', 'class', 'title', 
'style', 'clear' ],
+                               'br': [ 'id', 'class', 'title', 'style', 
'clear' ],
 
                                // 9.3.4
-                               'pre'        : common.concat([ 'width' ]),
+                               'pre': common.concat([ 'width' ]),
 
                                // 9.4
-                               'ins'        : common.concat([ 'cite', 
'datetime' ]),
-                               'del'        : common.concat([ 'cite', 
'datetime' ]),
+                               'ins': common.concat([ 'cite', 'datetime' ]),
+                               'del': common.concat([ 'cite', 'datetime' ]),
 
                                // 10.2
-                               'ul'         : common.concat([ 'type' ]),
-                               'ol'         : common.concat([ 'type', 'start' 
]),
-                               'li'         : common.concat([ 'type', 'value' 
]),
+                               'ul': common.concat([ 'type' ]),
+                               'ol': common.concat([ 'type', 'start' ]),
+                               'li': common.concat([ 'type', 'value' ]),
 
                                // 10.3
-                               'dl'         : common,
-                               'dd'         : common,
-                               'dt'         : common,
+                               'dl': common,
+                               'dd': common,
+                               'dt': common,
 
                                // 11.2.1
-                               'table'      : common.concat([ 'summary', 
'width', 'border', 'frame',
+                               'table': common.concat([ 'summary', 'width', 
'border', 'frame',
                                                                                
        'rules', 'cellspacing', 'cellpadding',
                                                                                
        'align', 'bgcolor' ]),
 
                                // 11.2.2
-                               'caption'    : common.concat([ 'align' ]),
+                               'caption': common.concat([ 'align' ]),
 
                                // 11.2.3
-                               'thead'      : common.concat(tablealign),
-                               'tfoot'      : common.concat(tablealign),
-                               'tbody'      : common.concat(tablealign),
+                               'thead': common.concat(tablealign),
+                               'tfoot': common.concat(tablealign),
+                               'tbody': common.concat(tablealign),
 
                                // 11.2.4
-                               'colgroup'   : common.concat([ 'span', 'width' 
]).concat(tablealign),
-                               'col'        : common.concat([ 'span', 'width' 
]).concat(tablealign),
+                               'colgroup': common.concat([ 'span', 'width' 
]).concat(tablealign),
+                               'col':      common.concat([ 'span', 'width' 
]).concat(tablealign),
 
                                // 11.2.5
-                               'tr'         : common.concat([ 'bgcolor' 
]).concat(tablealign),
+                               'tr': common.concat([ 'bgcolor' 
]).concat(tablealign),
 
                                // 11.2.6
-                               'td'         : 
common.concat(tablecell).concat(tablealign),
-                               'th'         : 
common.concat(tablecell).concat(tablealign),
+                               'td': 
common.concat(tablecell).concat(tablealign),
+                               'th': 
common.concat(tablecell).concat(tablealign),
 
                                // 12.2 # NOTE: <a> is not allowed directly, 
but the attrib whitelist is used from the Parser object
-                               'a'          : common.concat([ 'href', 'rel', 
'rev' ]), // rel/rev esp. for RDFa
+                               'a': common.concat([ 'href', 'rel', 'rev' ]), 
// rel/rev esp. for RDFa
 
                                // Add in link tags so we can pass in 
categories, etc.
-                               'link'       : common.concat([ 'href', 'rel' 
]), // rel/rev esp. for RDFa
+                               'link': common.concat([ 'href', 'rel' ]), // 
rel/rev esp. for RDFa
 
                                // 13.2
                                // Not usually allowed, but may be used for 
extension-style hooks
                                // such as <math> when it is rasterized, or if 
wgAllowImageTag is
                                // true
-                               'img'        : common.concat([ 'alt', 'src', 
'width', 'height' ]),
+                               'img': common.concat([ 'alt', 'src', 'width', 
'height' ]),
 
                                // 15.2.1
-                               'tt'         : common,
-                               'b'          : common,
-                               'i'          : common,
-                               'big'        : common,
-                               'small'      : common,
-                               'strike'     : common,
-                               's'          : common,
-                               'u'          : common,
+                               'tt':     common,
+                               'b':      common,
+                               'i':      common,
+                               'big':    common,
+                               'small':  common,
+                               'strike': common,
+                               's':      common,
+                               'u':      common,
 
                                // 15.2.2
-                               'font'       : common.concat([ 'size', 'color', 
'face' ]),
+                               'font': common.concat([ 'size', 'color', 'face' 
]),
                                // basefont
 
                                // 15.3
-                               'hr'         : common.concat([ 'noshade', 
'size', 'width' ]),
+                               'hr': common.concat([ 'noshade', 'size', 
'width' ]),
 
                                // XHTML Ruby annotation text module, simple 
ruby only.
                                // http://www.w3c.org/TR/ruby/
-                               'ruby'       : common,
+                               'ruby': common,
                                // rbc
-                               'rb'         : common,
-                               'rp'         : common,
-                               'rt'         : common,  // common.concat([ 
'rbspan' ]),
-                               'rtc'        : common,
+                               'rb':  common,
+                               'rp':  common,
+                               'rt':  common,  // common.concat([ 'rbspan' ]),
+                               'rtc': common,
 
                                // MathML root element, where used for 
extensions
                                // 'title' may not be 100% valid here; it's 
XHTML
                                // http://www.w3.org/TR/REC-MathML/
-                               'math'       : [ 'class', 'style', 'id', 
'title' ],
+                               'math': [ 'class', 'style', 'id', 'title' ],
 
                                // HTML 5 section 4.5
-                               'figure'     : common,
-                               'figcaption' : common,
+                               'figure':     common,
+                               'figcaption': common,
 
                                // HTML 5 section 4.6
-                               'bdi' : common,
-                               'wbr' : [ 'id', 'class', 'title', 'style' ],
+                               'bdi': common,
+                               'wbr': [ 'id', 'class', 'title', 'style' ],
 
                                // HTML5 elements, defined by 
http://www.whatwg.org/html/
                                'data': common.concat(['value']),
diff --git a/lib/jsutils.js b/lib/jsutils.js
index cba45f6..7149efe 100644
--- a/lib/jsutils.js
+++ b/lib/jsutils.js
@@ -88,7 +88,7 @@
 
        // Append an array to an accumulator using the most efficient method
        // available. Makes sure that accumulation is O(n).
-       pushArray : function push(accum, arr) {
+       pushArray: function push(accum, arr) {
                if (accum.length < arr.length) {
                        return accum.concat(arr);
                } else {
diff --git a/lib/linter.js b/lib/linter.js
index ea2e009..d3bfd53 100644
--- a/lib/linter.js
+++ b/lib/linter.js
@@ -21,7 +21,7 @@
                        } else {
                                request.post(
                                        this._env.conf.parsoid.linterAPI,
-                                       {json : this.buffer},
+                                       { json: this.buffer },
                                        function(error, response, body) {
                                                if (!error && 
response.statusCode === 200) {
                                                        console.log(body);
diff --git a/lib/mediawiki.DOMUtils.js b/lib/mediawiki.DOMUtils.js
index 706756c..3f30329 100644
--- a/lib/mediawiki.DOMUtils.js
+++ b/lib/mediawiki.DOMUtils.js
@@ -1966,27 +1966,27 @@
        // This code is not in mediawiki.wikitext.constants.js because this
        // information is Parsoid-implementation-specific.
        WT_tagsWithLimitedTSR: {
-               "b" : true,
-               "i" : true,
-               "h1" : true,
-               "h2" : true,
-               "h3" : true,
-               "h4" : true,
-               "h5" : true,
-               "ul" : true,
-               "ol" : true,
-               "dl" : true,
-               "li" : true,
-               "dt" : true,
-               "dd" : true,
-               "table" : true,
-               "caption" : true,
-               "tr" : true,
-               "td" : true,
-               "th" : true,
-               "hr" : true, // void element
-               "br" : true, // void element
-               "pre" : true
+               "b":       true,
+               "i":       true,
+               "h1":      true,
+               "h2":      true,
+               "h3":      true,
+               "h4":      true,
+               "h5":      true,
+               "ul":      true,
+               "ol":      true,
+               "dl":      true,
+               "li":      true,
+               "dt":      true,
+               "dd":      true,
+               "table":   true,
+               "caption": true,
+               "tr":      true,
+               "td":      true,
+               "th":      true,
+               "hr":      true, // void element
+               "br":      true, // void element
+               "pre":     true,
        },
 
        tsrSpansTagDOM: function(n, parsoidData) {
diff --git a/lib/mediawiki.SelectiveSerializer.js 
b/lib/mediawiki.SelectiveSerializer.js
index 9ed0477..614d242 100644
--- a/lib/mediawiki.SelectiveSerializer.js
+++ b/lib/mediawiki.SelectiveSerializer.js
@@ -29,7 +29,7 @@
  */
 var SelectiveSerializer = function( options ) {
        // Set edit mode
-       this.env = options.env || { conf : { parsoid : {} } };
+       this.env = options.env || { conf: { parsoid: {} } };
        this.env.conf.parsoid.rtTestMode = false;
        this.wts = options.wts || new WikitextSerializer( options );
 
diff --git a/lib/mediawiki.TokenTransformManager.js 
b/lib/mediawiki.TokenTransformManager.js
index 684f107..37d0d88 100644
--- a/lib/mediawiki.TokenTransformManager.js
+++ b/lib/mediawiki.TokenTransformManager.js
@@ -78,13 +78,13 @@
 // Map of: token constructor ==> transfomer type
 // Used for returning active transformers for a token
 TokenTransformManager.tkConstructorToTkTypeMap = {
-       "String" : "text",
-       "NlTk" : "newline",
-       "CommentTk" : "comment",
-       "EOFTk" : "end",
-       "TagTk" : "tag",
-       "EndTagTk" : "tag",
-       "SelfclosingTagTk" : "tag"
+       "String": "text",
+       "NlTk": "newline",
+       "CommentTk": "comment",
+       "EOFTk": "end",
+       "TagTk": "tag",
+       "EndTagTk": "tag",
+       "SelfclosingTagTk": "tag"
 };
 
 // Inherit from EventEmitter
diff --git a/lib/mediawiki.Util.js b/lib/mediawiki.Util.js
index cd0af76..fa865ef 100644
--- a/lib/mediawiki.Util.js
+++ b/lib/mediawiki.Util.js
@@ -1472,14 +1472,14 @@
 // StatsD wrapper
 Util.StatsD = function( statsdHost, statsdPort ) {
        this.statsd = new TXStatsD({
-               host: statsdHost,
-               port: statsdPort,
-               prefix: 'parsoid.',   // prefix each stat for hierarchical 
namespacing
-               suffix: '',
-               txstatsd  : false,
-               globalize : false,
-               cacheDns  : true,
-               mock      : false
+               host:      statsdHost,
+               port:      statsdPort,
+               prefix:    'parsoid.',  // prefix each stat for hierarchical 
namespacing
+               suffix:    '',
+               txstatsd:  false,
+               globalize: false,
+               cacheDns:  true,
+               mock:      false
        });
 
        this.nameCache = {};
diff --git a/lib/mediawiki.WikiConfig.js b/lib/mediawiki.WikiConfig.js
index 6c9356e..f21b613 100644
--- a/lib/mediawiki.WikiConfig.js
+++ b/lib/mediawiki.WikiConfig.js
@@ -567,16 +567,16 @@
        // SSS FIXME: ISBN url checker has to verify that the number is 10/13 
digits long
        // We are punting on that right now which can lead to broken HTML 
serialization for
        // invalid ISBN urls. For now, we "trust" clients to do the right thing.
-       'ISBN' : {
+       'ISBN': {
                prefix: "(?:(?:[.][.]?/)*)",
                re: 'Special:BookSources/%isbn'
        },
-       'RFC'  : { re: '//tools.ietf.org/html/rfc%s' },
-       'PMID' : { re: '//www.ncbi.nlm.nih.gov/pubmed/%s?dopt=Abstract' }
+       'RFC': { re: '//tools.ietf.org/html/rfc%s' },
+       'PMID': { re: '//www.ncbi.nlm.nih.gov/pubmed/%s?dopt=Abstract' }
 };
 
 WikiConfig.prototype.ExtResourceSerializer = {
-       'ISBN' : function(hrefWT, href, content) {
+       'ISBN': function(hrefWT, href, content) {
                if (hrefWT.join('') === content.replace(/[\- ]/g, '')) {
                        return content;
                } else {
@@ -584,10 +584,10 @@
                        return '[[' + href + '|' + content + ']]';
                }
        },
-       'RFC'  : function(hrefWT, href, content) {
+       'RFC': function(hrefWT, href, content) {
                return hrefWT.join(' ') === content ? content : '[' + href + ' 
' + content + ']';
        },
-       'PMID' : function(hrefWT, href, content) {
+       'PMID': function(hrefWT, href, content) {
                return hrefWT.join(' ') === content ? content : '[' + href + ' 
' + content + ']';
        }
 };
diff --git a/lib/mediawiki.wikitext.constants.js 
b/lib/mediawiki.wikitext.constants.js
index a0171f2..ef08550 100644
--- a/lib/mediawiki.wikitext.constants.js
+++ b/lib/mediawiki.wikitext.constants.js
@@ -21,44 +21,44 @@
        // for more information about how they are used.
        Image: {
                PrefixOptions: JSUtils.mapObject({
-                       'img_link'      : 'link',
-                       'img_alt'       : 'alt',
-                       'img_page'      : 'page',
-                       'img_lang'      : 'lang', // see bug 32987
-                       'img_upright'   : 'upright',
-                       'img_width'     : 'width',
-                       'img_class'     : 'class',
+                       'img_link':        'link',
+                       'img_alt':         'alt',
+                       'img_page':        'page',
+                       'img_lang':        'lang',  // see bug 32987
+                       'img_upright':     'upright',
+                       'img_width':       'width',
+                       'img_class':       'class',
                        'img_manualthumb': 'manualthumb'
                }),
                /* filled in below, based on PrefixOptions */
                PrefixOptionsReverseMap: new Map(),
                SimpleOptions: JSUtils.mapObject({
                        // halign
-                       'img_left'   : 'halign',
-                       'img_right'  : 'halign',
-                       'img_center' : 'halign',
-                       'img_none'   : 'halign',
+                       'img_left':   'halign',
+                       'img_right':  'halign',
+                       'img_center': 'halign',
+                       'img_none':   'halign',
 
                        // valign
-                       'img_baseline'    : 'valign',
-                       'img_sub'         : 'valign',
-                       'img_super'       : 'valign',
-                       'img_top'         : 'valign',
-                       'img_text_top'    : 'valign',
-                       'img_middle'      : 'valign',
-                       'img_bottom'      : 'valign',
-                       'img_text_bottom' : 'valign',
+                       'img_baseline':    'valign',
+                       'img_sub':         'valign',
+                       'img_super':       'valign',
+                       'img_top':         'valign',
+                       'img_text_top':    'valign',
+                       'img_middle':      'valign',
+                       'img_bottom':      'valign',
+                       'img_text_bottom': 'valign',
 
                        // format
                        // 'border' can be given in addition to *one of*
                        // frameless, framed, or thumbnail
-                       'img_border'    : 'border',
-                       'img_frameless' : 'format',
-                       'img_framed'    : 'format',
-                       'img_thumbnail' : 'format',
+                       'img_border':    'border',
+                       'img_frameless': 'format',
+                       'img_framed':    'format',
+                       'img_thumbnail': 'format',
 
                        // Ha! Upright can be either one! Try parsing THAT!
-                       'img_upright'   : 'upright'
+                       'img_upright': 'upright'
                })
        },
 
@@ -249,33 +249,33 @@
        // Known wikitext tag widths -- these are known statically
        // but other widths are computed or updated based on actual wikitext 
usage
        WT_TagWidths: JSUtils.mapObject({
-               "BODY"  : [0, 0],
-               "HTML"  : [0, 0],
-               "HEAD"  : [0, 0],
-               "P"     : [0, 0],
-               "META"  : [0, 0],
-               "TBODY" : [0, 0],
-               "PRE"   : [1, 0],
-               "OL"    : [0, 0],
-               "UL"    : [0, 0],
-               "DL"    : [0, 0],
-               "LI"    : [1, 0],
-               "DT"    : [1, 0],
-               "DD"    : [1, 0],
-               "H1"    : [1, 1],
-               "H2"    : [2, 2],
-               "H3"    : [3, 3],
-               "H4"    : [4, 4],
-               "H5"    : [5, 5],
-               "H6"    : [6, 6],
-               "HR"    : [4, 0],
-               "TABLE" : [2, 2],
-               "TR"    : [null, 0],
-               "TD"    : [null, 0],
-               "TH"    : [null, 0],
-               "B"     : [3, 3],
-               "I"     : [2, 2],
-               "BR"    : [0, 0],
+               "BODY":   [0, 0],
+               "HTML":   [0, 0],
+               "HEAD":   [0, 0],
+               "P":      [0, 0],
+               "META":   [0, 0],
+               "TBODY":  [0, 0],
+               "PRE":    [1, 0],
+               "OL":     [0, 0],
+               "UL":     [0, 0],
+               "DL":     [0, 0],
+               "LI":     [1, 0],
+               "DT":     [1, 0],
+               "DD":     [1, 0],
+               "H1":     [1, 1],
+               "H2":     [2, 2],
+               "H3":     [3, 3],
+               "H4":     [4, 4],
+               "H5":     [5, 5],
+               "H6":     [6, 6],
+               "HR":     [4, 0],
+               "TABLE":  [2, 2],
+               "TR":     [null, 0],
+               "TD":     [null, 0],
+               "TH":     [null, 0],
+               "B":      [3, 3],
+               "I":      [2, 2],
+               "BR":     [0, 0],
                "FIGURE": [2, 2]
        }),
 
diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index 5b4de4d..2642236 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -466,8 +466,8 @@
     identifier = identifier.join('');
 
     var base_urls = {
-            'RFC'  : '//tools.ietf.org/html/rfc%s',
-            'PMID' : '//www.ncbi.nlm.nih.gov/pubmed/%s?dopt=Abstract'
+            'RFC': '//tools.ietf.org/html/rfc%s',
+            'PMID': '//www.ncbi.nlm.nih.gov/pubmed/%s?dopt=Abstract'
         },
         url = tu.sprintf(base_urls[ref], identifier);
 
diff --git a/tests/server/importJson.js b/tests/server/importJson.js
index 3669367..14457e6 100755
--- a/tests/server/importJson.js
+++ b/tests/server/importJson.js
@@ -10,10 +10,10 @@
 
 // Default options
 var defaults = {
-       'host': 'localhost',
-       'port': 3306,
+       'host':     'localhost',
+       'port':     3306,
        'database': 'parsoid',
-       'user': 'parsoid',
+       'user':     'parsoid',
        'password': 'parsoidpw'
 };
 
@@ -80,13 +80,13 @@
 
 var mysql = require( 'mysql' );
 var db = mysql.createConnection({
-       host     : getOption( 'host' ),
-       port     : getOption( 'port' ),
-       database : getOption( 'database' ),
-       user     : getOption( 'user' ),
-       password : getOption( 'password' ),
-       charset  : 'UTF8_BIN',
-       multipleStatements : true
+       host:               getOption('host'),
+       port:               getOption('port'),
+       database:           getOption('database'),
+       user:               getOption('user'),
+       password:           getOption('password'),
+       charset:            'UTF8_BIN',
+       multipleStatements: true
 });
 
 var waitingCount = 0.5;
diff --git a/tests/server/server.js b/tests/server/server.js
index 24a5ee1..4b3b11a 100755
--- a/tests/server/server.js
+++ b/tests/server/server.js
@@ -10,16 +10,16 @@
 
 // Default options
 var defaults = {
-       'host': 'localhost',
-       'port': 3306,
-       'database': 'parsoid',
-       'user': 'parsoid',
-       'password': 'parsoidpw',
-       'debug': false,
-       'fetches': 6,
-       'tries': 6,
-       'cutofftime': 600,
-       'batch': 50,
+       'host':           'localhost',
+       'port':           3306,
+       'database':       'parsoid',
+       'user':           'parsoid',
+       'password':       'parsoidpw',
+       'debug':          false,
+       'fetches':        6,
+       'tries':          6,
+       'cutofftime':     600,
+       'batch':          50,
        generateTitleUrl: function(server, prefix, title) {
                return server.replace(/\/$/, '') + "/_rt/" + prefix + "/" + 
title;
        },
@@ -138,15 +138,15 @@
 
 var mysql = require( 'mysql' );
 var db = mysql.createConnection({
-       host     : getOption( 'host' ),
-       port     : getOption( 'port' ),
-       database : getOption( 'database' ),
-       user     : getOption( 'user' ),
-       password : getOption( 'password'),
-       multipleStatements : true,
-       charset  : 'UTF8_BIN',
-       debug    : debug
-} );
+       host:               getOption('host'),
+       port:               getOption('port'),
+       database:           getOption('database'),
+       user:               getOption('user'),
+       password:           getOption('password'),
+       multipleStatements: true,
+       charset:            'UTF8_BIN',
+       debug:              debug
+});
 
 var queues = require( 'mysql-queues' );
 queues( db, debug );

-- 
To view, visit https://gerrit.wikimedia.org/r/202264
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba32bf7cf4ed9c255b4b84bce3a6295abf414916
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to