Index: trunk/parsers/wikidom/tests/synth/test.js |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | var updates = 0; |
11 | 11 | container1.on( 'update', function( item ) { |
12 | | - updates++ |
| 12 | + updates++; |
13 | 13 | } ); |
14 | 14 | |
15 | 15 | // Creating |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | |
41 | 41 | // Accessing |
42 | 42 | |
43 | | - deepEqual( container1.all(), [item1, item2, item3], 'es.ModelContainer.items returns all items' ) |
| 43 | + deepEqual( container1.all(), [item1, item2, item3], 'es.ModelContainer.items returns all items' ); |
44 | 44 | |
45 | 45 | strictEqual( container1.get( 0 ), item1, 'es.ModelContainer.get returns correct item at index' ); |
46 | 46 | strictEqual( container1.get( 1 ), item2, 'es.ModelContainer.get returns correct item at index' ); |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | return false; |
76 | 76 | } |
77 | 77 | } ); |
78 | | - equal( count, 2, 'es.ModelContainer.each stops iterating when a callback returns false' ) |
| 78 | + equal( count, 2, 'es.ModelContainer.each stops iterating when a callback returns false' ); |
79 | 79 | |
80 | 80 | // Updating |
81 | 81 | |
— | — | @@ -208,7 +208,8 @@ |
209 | 209 | c = new ContentStub( 'c', 2 ), |
210 | 210 | d = new ContentStub( 'd', 3 ), |
211 | 211 | e = new ContentStub( 'e', 4 ), |
212 | | - contentSeries1 = new es.AggregateArray( [a, b, c, d, e] ); |
| 212 | + contentSeries1 = new es.AggregateArray( [a, b, c, d, e] ), |
| 213 | + i; |
213 | 214 | |
214 | 215 | var lengthOfItemsTests = [ |
215 | 216 | { 'input': [], 'output': 0 }, |
— | — | @@ -219,7 +220,7 @@ |
220 | 221 | { 'input': [a, b, c, d, e], 'output': 14 } |
221 | 222 | ]; |
222 | 223 | |
223 | | - for ( var i = 0; i < lengthOfItemsTests.length; i++ ) { |
| 224 | + for ( i = 0; i < lengthOfItemsTests.length; i++ ) { |
224 | 225 | strictEqual( |
225 | 226 | ( new es.AggregateArray( lengthOfItemsTests[i].input ) ).getLengthOfItems(), |
226 | 227 | lengthOfItemsTests[i].output, |
— | — | @@ -247,7 +248,7 @@ |
248 | 249 | { 'input': 15, 'output': null } |
249 | 250 | ]; |
250 | 251 | |
251 | | - for ( var i = 0; i < lookupTests.length; i++ ) { |
| 252 | + for ( i = 0; i < lookupTests.length; i++ ) { |
252 | 253 | strictEqual( |
253 | 254 | contentSeries1.lookup( lookupTests[i].input ), |
254 | 255 | lookupTests[i].output, |
— | — | @@ -264,7 +265,7 @@ |
265 | 266 | { 'input': null, 'output': null } |
266 | 267 | ]; |
267 | 268 | |
268 | | - for ( var i = 0; i < rangeOfTests.length; i++ ) { |
| 269 | + for ( i = 0; i < rangeOfTests.length; i++ ) { |
269 | 270 | deepEqual( |
270 | 271 | contentSeries1.rangeOf( rangeOfTests[i].input ), |
271 | 272 | rangeOfTests[i].output, |
— | — | @@ -279,15 +280,15 @@ |
280 | 281 | var selectTests = [ |
281 | 282 | { |
282 | 283 | 'input': [0, 5], |
283 | | - 'output': [{ 'item': f, 'from': 0, 'to': 5 }], |
| 284 | + 'output': [{ 'item': f, 'from': 0, 'to': 5 }] |
284 | 285 | }, |
285 | 286 | { |
286 | 287 | 'input': [11, 16], |
287 | | - 'output': [{ 'item': g, 'from': 0, 'to': 5 }], |
| 288 | + 'output': [{ 'item': g, 'from': 0, 'to': 5 }] |
288 | 289 | }, |
289 | 290 | { |
290 | 291 | 'input': [22, 27], |
291 | | - 'output': [{ 'item': h, 'from': 0, 'to': 5 }], |
| 292 | + 'output': [{ 'item': h, 'from': 0, 'to': 5 }] |
292 | 293 | }, |
293 | 294 | { |
294 | 295 | 'input': [0, 33], |
— | — | @@ -307,7 +308,7 @@ |
308 | 309 | }, |
309 | 310 | { |
310 | 311 | 'input': [5, 9], |
311 | | - 'output': [{ 'item': f, 'from': 5, 'to': 9 }], |
| 312 | + 'output': [{ 'item': f, 'from': 5, 'to': 9 }] |
312 | 313 | }, |
313 | 314 | { |
314 | 315 | 'input': [5, 10], |
— | — | @@ -343,7 +344,7 @@ |
344 | 345 | } |
345 | 346 | ]; |
346 | 347 | |
347 | | - for ( var i = 0; i < selectTests.length; i++ ) { |
| 348 | + for ( i = 0; i < selectTests.length; i++ ) { |
348 | 349 | deepEqual( |
349 | 350 | contentSeries2.select.apply( contentSeries2, selectTests[i].input ), |
350 | 351 | selectTests[i].output, |
Index: trunk/parsers/wikidom/tests/serializers/test.js |
— | — | @@ -5,7 +5,8 @@ |
6 | 6 | wikitextSerializer = new es.Document.WikitextSerializer( context ); |
7 | 7 | |
8 | 8 | function assertSerializations( tests, domToDom ) { |
9 | | - for ( var i = 0; i < tests.length; i++ ) { |
| 9 | + var i; |
| 10 | + for ( i = 0; i < tests.length; i++ ) { |
10 | 11 | if ( typeof tests[i].html !== 'undefined' ) { |
11 | 12 | equals( |
12 | 13 | htmlSerializer.serializeDocument( tests[i].dom ), |
— | — | @@ -14,7 +15,7 @@ |
15 | 16 | ); |
16 | 17 | } |
17 | 18 | } |
18 | | - for ( var i = 0; i < tests.length; i++ ) { |
| 19 | + for ( i = 0; i < tests.length; i++ ) { |
19 | 20 | if ( typeof tests[i].wikitext !== 'undefined' ) { |
20 | 21 | equals( |
21 | 22 | wikitextSerializer.serializeDocument( tests[i].dom ), |
— | — | @@ -25,7 +26,7 @@ |
26 | 27 | } |
27 | 28 | if ( typeof domToDom !== 'undefined' && domToDom === true ) { |
28 | 29 | var doc; |
29 | | - for ( var i = 0; i < tests.length; i++ ) { |
| 30 | + for ( i = 0; i < tests.length; i++ ) { |
30 | 31 | deepEqual( |
31 | 32 | doc = es.Document.newFromWikiDomDocument( tests[i].dom ).getWikiDomDocument(), |
32 | 33 | tests[i].dom, |
— | — | @@ -142,13 +143,13 @@ |
143 | 144 | } ] }, |
144 | 145 | 'html': '<h1>Heading with a <a href="https://www.mediawiki.org/wiki/Main_Page">link</a></h1>', |
145 | 146 | 'wikitext': '=Heading with a [[Main_Page|link]]=' |
146 | | - }, |
| 147 | + } |
147 | 148 | ] ); |
148 | 149 | } ); |
149 | 150 | |
150 | 151 | test( 'Paragraphs', function() { |
151 | 152 | assertSerializations( [ |
152 | | - { |
| 153 | + { |
153 | 154 | 'subject': 'paragraph with a single line of plain text', |
154 | 155 | 'dom': { 'blocks': [ { |
155 | 156 | 'type': 'paragraph', |
— | — | @@ -186,13 +187,13 @@ |
187 | 188 | 'html': '<p>Line with <strong>bold</strong> and <em>italic</em> text</p>', |
188 | 189 | 'wikitext': 'Line with \'\'\'bold\'\'\' and \'\'italic\'\' text' |
189 | 190 | } |
190 | | - ], true ); |
| 191 | + ], true ); |
191 | 192 | } ); |
192 | 193 | |
193 | 194 | // Lists |
194 | 195 | test( 'Lists', function() { |
195 | 196 | assertSerializations( [ |
196 | | - { |
| 197 | + { |
197 | 198 | 'subject': 'numbered list', |
198 | 199 | 'dom': { 'blocks': [ { |
199 | 200 | 'type': 'list', |
— | — | @@ -206,7 +207,7 @@ |
207 | 208 | 'html': '<ol>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ol>', |
208 | 209 | 'wikitext': '# 1\n# 2\n# 3' |
209 | 210 | }, |
210 | | - { |
| 211 | + { |
211 | 212 | 'subject': 'bulleted list', |
212 | 213 | 'dom': { 'blocks': [ { |
213 | 214 | 'type': 'list', |
— | — | @@ -220,7 +221,7 @@ |
221 | 222 | 'html': '<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>', |
222 | 223 | 'wikitext': '* 1\n* 2\n* 3' |
223 | 224 | }, |
224 | | - { |
| 225 | + { |
225 | 226 | 'subject': 'mixed-style nested lists (1)', |
226 | 227 | 'dom': { 'blocks': [ { |
227 | 228 | 'type': 'list', |
— | — | @@ -242,11 +243,11 @@ |
243 | 244 | { 'line': { 'text': '2' } } |
244 | 245 | ] |
245 | 246 | } ] }, |
246 | | - 'html': '<ul>\n<li>1\n<ol>\n<li>1.1</li>\n<li>1.2</li>\n<li>1.3</li>\n</ol>' |
247 | | - + '\n</li>\n<li>2</li>\n</ul>', |
| 247 | + 'html': '<ul>\n<li>1\n<ol>\n<li>1.1</li>\n<li>1.2</li>\n<li>1.3</li>\n</ol>' + |
| 248 | + '\n</li>\n<li>2</li>\n</ul>', |
248 | 249 | 'wikitext': '* 1\n*# 1.1\n*# 1.2\n*# 1.3\n* 2' |
249 | 250 | }, |
250 | | - { |
| 251 | + { |
251 | 252 | 'subject': 'mixed-style nested lists (2)', |
252 | 253 | 'dom': { 'blocks': [ { |
253 | 254 | 'type': 'list', |
— | — | @@ -285,7 +286,7 @@ |
286 | 287 | ] |
287 | 288 | } ] } |
288 | 289 | }, |
289 | | - { |
| 290 | + { |
290 | 291 | 'subject': 'mixed-style nested lists (3)', |
291 | 292 | 'dom': { 'blocks': [ { |
292 | 293 | 'type': 'list', |
— | — | @@ -362,8 +363,8 @@ |
363 | 364 | ] |
364 | 365 | ] |
365 | 366 | }] }, |
366 | | - 'html': '<table>\n<tr>\n<th>A</th>\n<th>B</th>\n</tr>\n<tr>\n' |
367 | | - + '<td>1</td>\n<td>2</td>\n</tr>\n</table>', |
| 367 | + 'html': '<table>\n<tr>\n<th>A</th>\n<th>B</th>\n</tr>\n<tr>\n' + |
| 368 | + '<td>1</td>\n<td>2</td>\n</tr>\n</table>', |
368 | 369 | 'wikitext': '{|\n!A\n!B\n|-\n|1\n|2\n|}' |
369 | 370 | }, |
370 | 371 | { |
Index: trunk/parsers/wikidom/lib/synth/es.js |
— | — | @@ -62,9 +62,9 @@ |
63 | 63 | bValue = b[k]; |
64 | 64 | aType = typeof aValue; |
65 | 65 | bType = typeof bValue; |
66 | | - if ( aType !== bType |
67 | | - || ( ( aType === 'string' || aType === 'number' ) && aValue !== bValue ) |
68 | | - || ( $.isPlainObject( aValue ) && !es.compareObjects( aValue, bValue ) ) ) { |
| 66 | + if ( aType !== bType || |
| 67 | + ( ( aType === 'string' || aType === 'number' ) && aValue !== bValue ) || |
| 68 | + ( $.isPlainObject( aValue ) && !es.compareObjects( aValue, bValue ) ) ) { |
69 | 69 | return false; |
70 | 70 | } |
71 | 71 | } |
Index: trunk/parsers/wikidom/lib/synth/models/es.CommentBlockModel.js |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | }; |
66 | 66 | |
67 | 67 | // Register constructor |
68 | | -es.BlockModel.constructors['comment'] = es.CommentBlockModel; |
| 68 | +es.BlockModel.constructors.comment = es.CommentBlockModel; |
69 | 69 | |
70 | 70 | /* Inheritance */ |
71 | 71 | |
Index: trunk/parsers/wikidom/lib/synth/models/es.ParagraphBlockModel.js |
— | — | @@ -103,7 +103,7 @@ |
104 | 104 | }; |
105 | 105 | |
106 | 106 | // Register constructor |
107 | | -es.BlockModel.constructors['paragraph'] = es.ParagraphBlockModel.newFromPlainObject; |
| 107 | +es.BlockModel.constructors.paragraph = es.ParagraphBlockModel.newFromPlainObject; |
108 | 108 | |
109 | 109 | /* Inheritance */ |
110 | 110 | |
Index: trunk/parsers/wikidom/lib/synth/models/es.TableBlockModel.js |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | return new es.TableBlockModel( |
36 | 36 | // Cells - if given, convert plain row objects to es.TableBlockRowModel objects |
37 | 37 | !$.isArray( obj.children ) ? [] : $.map( obj.children, function( row ) { |
38 | | - return !$.isPlainObject( row ) ? null : es.TableBlockRowModel.newFromPlainObject( row ) |
| 38 | + return !$.isPlainObject( row ) ? null : es.TableBlockRowModel.newFromPlainObject( row ); |
39 | 39 | } ), |
40 | 40 | // Attributes - if given, make a deep copy of attributes |
41 | 41 | !$.isPlainObject( obj.attributes ) ? {} : $.extend( true, {}, obj.attributes ) |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | }; |
116 | 116 | |
117 | 117 | // Register constructor |
118 | | -es.BlockModel.constructors['table'] = es.TableBlockModel.newFromPlainObject; |
| 118 | +es.BlockModel.constructors.table = es.TableBlockModel.newFromPlainObject; |
119 | 119 | |
120 | 120 | /* Inheritance */ |
121 | 121 | |
Index: trunk/parsers/wikidom/lib/synth/models/es.ListBlockModel.js |
— | — | @@ -143,7 +143,7 @@ |
144 | 144 | }; |
145 | 145 | |
146 | 146 | // Register constructor |
147 | | -es.BlockModel.constructors['list'] = es.ListBlockModel.newFromPlainObject |
| 147 | +es.BlockModel.constructors.list = es.ListBlockModel.newFromPlainObject; |
148 | 148 | |
149 | 149 | /* Inheritance */ |
150 | 150 | |
Index: trunk/parsers/wikidom/lib/synth/models/es.ContentModel.js |
— | — | @@ -88,9 +88,11 @@ |
89 | 89 | // TODO: This is invalid data! Throw error? |
90 | 90 | src.range.end = data.length; |
91 | 91 | } |
92 | | - for ( var i = src.range.start; i < src.range.end; i++ ) { |
| 92 | + for ( var j = src.range.start; j < src.range.end; j++ ) { |
93 | 93 | // Auto-convert to array |
94 | | - typeof data[i] === 'string' && ( data[i] = [data[i]] ); |
| 94 | + if ( typeof data[j] === 'string' ) { |
| 95 | + data[j] = [data[j]]; |
| 96 | + } |
95 | 97 | // Append |
96 | 98 | data[i].push( dst ); |
97 | 99 | } |
— | — | @@ -273,8 +275,8 @@ |
274 | 276 | for ( var i = stack.length - 1; i >= 0; i-- ) { |
275 | 277 | if ( !stack[i].range.end ) { |
276 | 278 | if ( annotation ) { |
277 | | - if ( stack[i].type === annotation.type |
278 | | - && es.compareObjects( stack[i].data, annotation.data ) ) { |
| 279 | + if ( stack[i].type === annotation.type && |
| 280 | + es.compareObjects( stack[i].data, annotation.data ) ) { |
279 | 281 | stack[i].range.end = offset; |
280 | 282 | break; |
281 | 283 | } |
— | — | @@ -508,6 +510,7 @@ |
509 | 511 | } else { |
510 | 512 | range.normalize(); |
511 | 513 | } |
| 514 | + var i; |
512 | 515 | /* |
513 | 516 | * Content isolation |
514 | 517 | * |
— | — | @@ -520,7 +523,7 @@ |
521 | 524 | * expensive to do on all content on every copy, so we only do it when we are going to modify |
522 | 525 | * the annotation information, and on as few annotated characters as possible. |
523 | 526 | */ |
524 | | - for ( var i = range.start; i < range.end; i++ ) { |
| 527 | + for ( i = range.start; i < range.end; i++ ) { |
525 | 528 | if ( typeof this.data[i] !== 'string' ) { |
526 | 529 | this.data[i] = this.data[i].slice( 0 ); |
527 | 530 | } |
— | — | @@ -541,7 +544,7 @@ |
542 | 545 | } |
543 | 546 | if ( method === 'add' ) { |
544 | 547 | var duplicate; |
545 | | - for ( var i = range.start; i < range.end; i++ ) { |
| 548 | + for ( i = range.start; i < range.end; i++ ) { |
546 | 549 | duplicate = -1; |
547 | 550 | if ( typeof this.data[i] === 'string' ) { |
548 | 551 | // Never annotate new lines |
— | — | @@ -563,7 +566,7 @@ |
564 | 567 | } |
565 | 568 | } |
566 | 569 | } else if ( method === 'remove' ) { |
567 | | - for ( var i = range.start; i < range.end; i++ ) { |
| 570 | + for ( i = range.start; i < range.end; i++ ) { |
568 | 571 | if ( typeof this.data[i] !== 'string' ) { |
569 | 572 | if ( annotation.type === 'all' ) { |
570 | 573 | // Remove all annotations by converting the annotated character to a plain |
Index: trunk/parsers/wikidom/lib/synth/models/es.HeadingBlockModel.js |
— | — | @@ -93,7 +93,7 @@ |
94 | 94 | }; |
95 | 95 | |
96 | 96 | // Register constructor |
97 | | -es.BlockModel.constructors['heading'] = es.HeadingBlockModel.newFromPlainObject; |
| 97 | +es.BlockModel.constructors.heading = es.HeadingBlockModel.newFromPlainObject; |
98 | 98 | |
99 | 99 | /* Inheritance */ |
100 | 100 | |
Index: trunk/parsers/wikidom/lib/synth/models/es.TableBlockRowModel.js |
— | — | @@ -32,8 +32,8 @@ |
33 | 33 | return new es.TableBlockRowModel( |
34 | 34 | // Cells - if given, convert plain cell objects to es.TableBlockCellModel objects |
35 | 35 | !$.isArray( obj.children ) ? [] : $.map( obj.children, function( cell ) { |
36 | | - return !$.isPlainObject( cell ) ? null |
37 | | - : es.TableBlockCellModel.newFromPlainObject( cell ) |
| 36 | + return !$.isPlainObject( cell ) ? null : |
| 37 | + es.TableBlockCellModel.newFromPlainObject( cell ); |
38 | 38 | } ), |
39 | 39 | // Attributes - if given, make a deep copy of attributes |
40 | 40 | !$.isPlainObject( obj.attributes ) ? {} : $.extend( true, {}, obj.attributes ) |
Index: trunk/parsers/wikidom/lib/synth/models/es.HorizontalRuleBlockModel.js |
— | — | @@ -47,11 +47,11 @@ |
48 | 48 | * @returns obj {Object} |
49 | 49 | */ |
50 | 50 | es.HorizontalRuleBlockModel.prototype.getPlainObject = function() { |
51 | | - return { 'type': 'horizontal-rule' }; |
| 51 | + return { 'type': 'horizontalRule' }; |
52 | 52 | }; |
53 | 53 | |
54 | 54 | // Register constructor |
55 | | -es.BlockModel.constructors['horizontal-rule'] = es.HorizontalRuleBlockModel; |
| 55 | +es.BlockModel.constructors.horizontalRule = es.HorizontalRuleBlockModel; |
56 | 56 | |
57 | 57 | /* Inheritance */ |
58 | 58 | |
Index: trunk/parsers/wikidom/lib/synth/es.JsonSerializer.js |
— | — | @@ -22,11 +22,11 @@ |
23 | 23 | return 'null'; |
24 | 24 | } |
25 | 25 | switch ( value.constructor ) { |
26 | | - case ( new Array ).constructor: |
| 26 | + case [].constructor: |
27 | 27 | return 'array'; |
28 | | - case ( new Date ).constructor: |
| 28 | + case ( new Date() ).constructor: |
29 | 29 | return 'date'; |
30 | | - case ( new RegExp ).constructor: |
| 30 | + case ( new RegExp() ).constructor: |
31 | 31 | return 'regex'; |
32 | 32 | default: |
33 | 33 | return 'object'; |
— | — | @@ -39,7 +39,8 @@ |
40 | 40 | if ( indention === undefined ) { |
41 | 41 | indention = ''; |
42 | 42 | } |
43 | | - var type = es.JsonSerializer.typeOf( data ); |
| 43 | + var type = es.JsonSerializer.typeOf( data ), |
| 44 | + key; |
44 | 45 | |
45 | 46 | // Open object/array |
46 | 47 | var json = ''; |
— | — | @@ -51,8 +52,8 @@ |
52 | 53 | json += '['; |
53 | 54 | } else { |
54 | 55 | var empty = true; |
55 | | - for ( var i in data ) { |
56 | | - if ( data.hasOwnProperty( i ) ) { |
| 56 | + for ( key in data ) { |
| 57 | + if ( data.hasOwnProperty( key ) ) { |
57 | 58 | empty = false; |
58 | 59 | break; |
59 | 60 | } |
— | — | @@ -65,27 +66,26 @@ |
66 | 67 | |
67 | 68 | // Iterate over items |
68 | 69 | var comma = false; |
69 | | - for ( var i in data ) { |
70 | | - if ( data.hasOwnProperty( i ) ) { |
71 | | - json += ( comma ? ',' : '' ) + '\n' + indention + this.options.indentWith |
72 | | - + ( type === 'array' ? '' : '"' + i + '"' + ': ' ); |
73 | | - switch ( es.JsonSerializer.typeOf( data[i] ) ) { |
| 70 | + for ( key in data ) { |
| 71 | + if ( data.hasOwnProperty( key ) ) { |
| 72 | + json += ( comma ? ',' : '' ) + '\n' + indention + this.options.indentWith + |
| 73 | + ( type === 'array' ? '' : '"' + key + '"' + ': ' ); |
| 74 | + switch ( es.JsonSerializer.typeOf( data[key] ) ) { |
74 | 75 | case 'array': |
75 | 76 | case 'object': |
76 | | - json += this.encode( data[i], indention + this.options.indentWith ); |
| 77 | + json += this.encode( data[key], indention + this.options.indentWith ); |
77 | 78 | break; |
78 | 79 | case 'boolean': |
79 | 80 | case 'number': |
80 | | - json += data[i].toString(); |
| 81 | + json += data[key].toString(); |
81 | 82 | break; |
82 | 83 | case 'null': |
83 | 84 | json += 'null'; |
84 | 85 | break; |
85 | 86 | case 'string': |
86 | | - json += '"' + data[i] |
| 87 | + json += '"' + data[key] |
87 | 88 | .replace(/[\n]/g, '\\n') |
88 | | - .replace(/[\t]/g, '\\t') |
89 | | - + '"'; |
| 89 | + .replace(/[\t]/g, '\\t') + '"'; |
90 | 90 | break; |
91 | 91 | // Skip other types |
92 | 92 | } |
Index: trunk/parsers/wikidom/lib/synth/es.Html.js |
— | — | @@ -33,8 +33,8 @@ |
34 | 34 | if ( escape ) { |
35 | 35 | value = wiki.util.xml.esc( value ); |
36 | 36 | } |
37 | | - return '<' + name + es.Html.makeAttributeList( attributes, true ) + '>' |
38 | | - + value + '</' + name + '>'; |
| 37 | + return '<' + name + es.Html.makeAttributeList( attributes, true ) + '>' + |
| 38 | + value + '</' + name + '>'; |
39 | 39 | } |
40 | 40 | } |
41 | 41 | }; |
Index: trunk/parsers/wikidom/lib/synth/es.Selection.js |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | this.to = to; |
17 | 17 | this.start = from; |
18 | 18 | this.end = to; |
19 | | -} |
| 19 | +}; |
20 | 20 | |
21 | 21 | /* Methods */ |
22 | 22 | |
Index: trunk/parsers/wikidom/lib/synth/bases/es.AggregateArray.js |
— | — | @@ -68,8 +68,8 @@ |
69 | 69 | var result = { 'on': [], 'off': [] }, |
70 | 70 | left = 0, |
71 | 71 | right, |
72 | | - items = [], |
73 | | - off = off || false; |
| 72 | + items = []; |
| 73 | + off = off || false; |
74 | 74 | |
75 | 75 | if ( typeof start.from === 'number' && typeof start.to === 'number') { |
76 | 76 | start.normalize(); |
Index: trunk/parsers/wikidom/lib/synth/bases/es.ViewList.js |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | itemView = itemModel.createView(); |
42 | 42 | } |
43 | 43 | return itemView; |
44 | | - } |
| 44 | + }; |
45 | 45 | |
46 | 46 | this.model.on( 'prepend', function( itemModel ) { |
47 | 47 | var itemView = list.recycleItemView( itemModel, true ); |
Index: trunk/parsers/wikidom/lib/synth/bases/es.EventEmitter.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | */ |
9 | 9 | es.EventEmitter = function() { |
10 | 10 | this.events = {}; |
11 | | -} |
| 11 | +}; |
12 | 12 | |
13 | 13 | /* Methods */ |
14 | 14 | |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | return this; |
106 | 106 | } |
107 | 107 | handlers.splice( i, 1 ); |
108 | | - if ( handlers.length == 0 ) { |
| 108 | + if ( handlers.length === 0 ) { |
109 | 109 | delete this.events[type]; |
110 | 110 | } |
111 | 111 | } |
Index: trunk/parsers/wikidom/lib/synth/bases/es.ModelList.js |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | * @returns {Integer} Number of items in container |
48 | 48 | */ |
49 | 49 | es.ModelList.prototype.getLength = function() { |
50 | | - return this.items.length |
| 50 | + return this.items.length; |
51 | 51 | }; |
52 | 52 | |
53 | 53 | /** |
— | — | @@ -76,8 +76,7 @@ |
77 | 77 | * @returns {Object} Last item |
78 | 78 | */ |
79 | 79 | es.ModelList.prototype.last = function() { |
80 | | - return this.items.length |
81 | | - ? this.items[this.items.length - 1] : null; |
| 80 | + return this.items.length ? this.items[this.items.length - 1] : null; |
82 | 81 | }; |
83 | 82 | |
84 | 83 | /** |
Index: trunk/parsers/wikidom/lib/synth/views/es.BlockView.js |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | */ |
73 | 73 | es.BlockView.prototype.getHtml = function( options ) { |
74 | 74 | throw 'BlockView.getHtml not implemented in this subclass.'; |
75 | | -} |
| 75 | +}; |
76 | 76 | |
77 | 77 | /* Inheritance */ |
78 | 78 | |
Index: trunk/parsers/wikidom/lib/synth/views/es.ContentView.js |
— | — | @@ -154,38 +154,36 @@ |
155 | 155 | // Add annotation to the top of the stack |
156 | 156 | stack.push( annotation ); |
157 | 157 | // Open annotation |
158 | | - out += typeof renderers[type]['open'] === 'function' |
159 | | - ? renderers[type]['open']( annotation.data ) |
160 | | - : renderers[type]['open']; |
| 158 | + out += typeof renderers[type].open === 'function' ? |
| 159 | + renderers[type].open( annotation.data ) : renderers[type].open; |
161 | 160 | } else { |
162 | 161 | if ( stack[stack.length - 1] === annotation ) { |
163 | 162 | // Remove annotation from top of the stack |
164 | 163 | stack.pop(); |
165 | 164 | // Close annotation |
166 | | - out += typeof renderers[type]['close'] === 'function' |
167 | | - ? renderers[type]['close']( annotation.data ) |
168 | | - : renderers[type]['close']; |
| 165 | + out += typeof renderers[type].close === 'function' ? |
| 166 | + renderers[type].close( annotation.data ) : renderers[type].close; |
169 | 167 | } else { |
170 | 168 | // Find the annotation in the stack |
171 | | - var depth = stack.indexOf( annotation ); |
| 169 | + var depth = stack.indexOf( annotation ), |
| 170 | + i; |
172 | 171 | if ( depth === -1 ) { |
173 | 172 | throw 'Invalid stack error. An element is missing from the stack.'; |
174 | 173 | } |
175 | 174 | // Close each already opened annotation |
176 | | - for ( var i = stack.length - 1; i >= depth + 1; i-- ) { |
177 | | - out += typeof renderers[stack[i].type]['close'] === 'function' |
178 | | - ? renderers[stack[i].type]['close']( stack[i].data ) |
179 | | - : renderers[stack[i].type]['close']; |
| 175 | + for ( i = stack.length - 1; i >= depth + 1; i-- ) { |
| 176 | + out += typeof renderers[stack[i].type].close === 'function' ? |
| 177 | + renderers[stack[i].type].close( stack[i].data ) : |
| 178 | + renderers[stack[i].type].close; |
180 | 179 | } |
181 | 180 | // Close the buried annotation |
182 | | - out += typeof renderers[type]['close'] === 'function' |
183 | | - ? renderers[type]['close']( annotation.data ) |
184 | | - : renderers[type]['close']; |
| 181 | + out += typeof renderers[type].close === 'function' ? |
| 182 | + renderers[type].close( annotation.data ) : renderers[type].close; |
185 | 183 | // Re-open each previously opened annotation |
186 | | - for ( var i = depth + 1; i < stack.length; i++ ) { |
187 | | - out += typeof renderers[stack[i].type]['open'] === 'function' |
188 | | - ? renderers[stack[i].type]['open']( stack[i].data ) |
189 | | - : renderers[stack[i].type]['open']; |
| 184 | + for ( i = depth + 1; i < stack.length; i++ ) { |
| 185 | + out += typeof renderers[stack[i].type].open === 'function' ? |
| 186 | + renderers[stack[i].type].open( stack[i].data ) : |
| 187 | + renderers[stack[i].type].open; |
190 | 188 | } |
191 | 189 | // Remove the annotation from the middle of the stack |
192 | 190 | stack.splice( depth, 1 ); |
— | — | @@ -445,7 +443,7 @@ |
446 | 444 | // Iterate over each word+boundary sequence, capturing offsets and encoding text as we go |
447 | 445 | var match, |
448 | 446 | end; |
449 | | - while ( match = this.boundaryTest.exec( text ) ) { |
| 447 | + while ( ( match = this.boundaryTest.exec( text ) ) ) { |
450 | 448 | // Include the boundary character in the range |
451 | 449 | end = match.index + 1; |
452 | 450 | // Store the boundary offset |
— | — | @@ -797,29 +795,31 @@ |
798 | 796 | right, |
799 | 797 | leftPlain, |
800 | 798 | rightPlain, |
801 | | - stack = []; |
802 | | - for ( var i = 0; i < data.length; i++ ) { |
| 799 | + stack = [], |
| 800 | + i, |
| 801 | + j; |
| 802 | + for ( i = 0; i < data.length; i++ ) { |
803 | 803 | right = data[i]; |
804 | 804 | leftPlain = typeof left === 'string'; |
805 | 805 | rightPlain = typeof right === 'string'; |
806 | 806 | if ( !leftPlain && rightPlain ) { |
807 | 807 | // [formatted][plain] pair, close any annotations for left |
808 | | - for ( var j = 1; j < left.length; j++ ) { |
| 808 | + for ( j = 1; j < left.length; j++ ) { |
809 | 809 | out += render( 'close', left[j], stack ); |
810 | 810 | } |
811 | 811 | } else if ( leftPlain && !rightPlain ) { |
812 | 812 | // [plain][formatted] pair, open any annotations for right |
813 | | - for ( var j = 1; j < right.length; j++ ) { |
| 813 | + for ( j = 1; j < right.length; j++ ) { |
814 | 814 | out += render( 'open', right[j], stack ); |
815 | 815 | } |
816 | 816 | } else if ( !leftPlain && !rightPlain ) { |
817 | 817 | // [formatted][formatted] pair, open/close any differences |
818 | | - for ( var j = 1; j < left.length; j++ ) { |
| 818 | + for ( j = 1; j < left.length; j++ ) { |
819 | 819 | if ( right.indexOf( left[j] ) === -1 ) { |
820 | 820 | out += render( 'close', left[j], stack ); |
821 | 821 | } |
822 | 822 | } |
823 | | - for ( var j = 1; j < right.length; j++ ) { |
| 823 | + for ( j = 1; j < right.length; j++ ) { |
824 | 824 | if ( left.indexOf( right[j] ) === -1 ) { |
825 | 825 | out += render( 'open', right[j], stack ); |
826 | 826 | } |
— | — | @@ -830,7 +830,7 @@ |
831 | 831 | } |
832 | 832 | // Close all remaining tags at the end of the content |
833 | 833 | if ( !rightPlain && right ) { |
834 | | - for ( var j = 1; j < right.length; j++ ) { |
| 834 | + for ( j = 1; j < right.length; j++ ) { |
835 | 835 | out += render( 'close', right[j], stack ); |
836 | 836 | } |
837 | 837 | } |
Index: trunk/parsers/wikidom/lib/es/es.BlockTransaction.js |
— | — | @@ -38,10 +38,11 @@ |
39 | 39 | */ |
40 | 40 | es.BlockTransaction.operations = ( function() { |
41 | 41 | function annotate( con, add, rem ) { |
42 | | - for ( var i = 0; i < add.length; i++ ) { |
| 42 | + var i; |
| 43 | + for ( i = 0; i < add.length; i++ ) { |
43 | 44 | con.annotate( 'add', add[i] ); |
44 | 45 | } |
45 | | - for ( var i = 0; i < rem.length; i++ ) { |
| 46 | + for ( i = 0; i < rem.length; i++ ) { |
46 | 47 | con.annotate( 'remove', rem[i] ); |
47 | 48 | } |
48 | 49 | } |
Index: trunk/parsers/wikidom/lib/es/es.js |
— | — | @@ -62,9 +62,9 @@ |
63 | 63 | bValue = b[k]; |
64 | 64 | aType = typeof aValue; |
65 | 65 | bType = typeof bValue; |
66 | | - if ( aType !== bType |
67 | | - || ( ( aType === 'string' || aType === 'number' ) && aValue !== bValue ) |
68 | | - || ( $.isPlainObject( aValue ) && !es.compareObjects( aValue, bValue ) ) ) { |
| 66 | + if ( aType !== bType || |
| 67 | + ( ( aType === 'string' || aType === 'number' ) && aValue !== bValue ) || |
| 68 | + ( $.isPlainObject( aValue ) && !es.compareObjects( aValue, bValue ) ) ) { |
69 | 69 | return false; |
70 | 70 | } |
71 | 71 | } |
Index: trunk/parsers/wikidom/lib/es/es.Document.Context.js |
— | — | @@ -31,8 +31,8 @@ |
32 | 32 | * @returns {Boolean} True if page exists |
33 | 33 | */ |
34 | 34 | es.Document.Context.prototype.isPage = function( namespace, title ) { |
35 | | - return typeof this.options.isPage === 'function' |
36 | | - ? this.options.isPage( namespace, title ) : false; |
| 35 | + return typeof this.options.isPage === 'function' ? |
| 36 | + this.options.isPage( namespace, title ) : false; |
37 | 37 | }; |
38 | 38 | |
39 | 39 | /** |
— | — | @@ -46,8 +46,8 @@ |
47 | 47 | * @returns {Object} Page DOM (document object) |
48 | 48 | */ |
49 | 49 | es.Document.Context.prototype.getWikiDom = function( namespace, title ) { |
50 | | - return typeof this.options.getWikiDom === 'function' |
51 | | - ? this.options.getWikiDom( namespace, title ) : null; |
| 50 | + return typeof this.options.getWikiDom === 'function' ? |
| 51 | + this.options.getWikiDom( namespace, title ) : null; |
52 | 52 | }; |
53 | 53 | |
54 | 54 | /** |
Index: trunk/parsers/wikidom/lib/es/es.ContentFlow.js |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | |
46 | 46 | // Initialization |
47 | 47 | this.scanBoundaries(); |
48 | | -} |
| 48 | +}; |
49 | 49 | |
50 | 50 | es.ContentFlow.prototype.getLineIndex = function( offset ) { |
51 | 51 | for ( var i = 0; i < this.lines.length; i++ ) { |
— | — | @@ -230,7 +230,7 @@ |
231 | 231 | // Iterate over each word+boundary sequence, capturing offsets and encoding text as we go |
232 | 232 | var match, |
233 | 233 | end; |
234 | | - while ( match = this.boundaryTest.exec( text ) ) { |
| 234 | + while ( ( match = this.boundaryTest.exec( text ) ) ) { |
235 | 235 | // Include the boundary character in the range |
236 | 236 | end = match.index + 1; |
237 | 237 | // Store the boundary offset |
Index: trunk/parsers/wikidom/lib/es/es.ListBlockItem.js |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | this.flow.on( 'render', function() { |
28 | 28 | listBlockItem.emit( 'update' ); |
29 | 29 | } ); |
30 | | -} |
| 30 | +}; |
31 | 31 | |
32 | 32 | /* Public Methods */ |
33 | 33 | |
Index: trunk/parsers/wikidom/lib/es/es.Content.js |
— | — | @@ -185,7 +185,9 @@ |
186 | 186 | } |
187 | 187 | for ( k = src.range.start; k < src.range.end; k++ ) { |
188 | 188 | // Auto-convert to array |
189 | | - typeof data[k] === 'string' && ( data[k] = [data[k]] ); |
| 189 | + if ( typeof data[k] === 'string' ) { |
| 190 | + data[k] = [data[k]]; |
| 191 | + } |
190 | 192 | // Append |
191 | 193 | data[k].push( dst ); |
192 | 194 | } |
— | — | @@ -209,23 +211,22 @@ |
210 | 212 | es.Content.renderAnnotation = function( bias, annotation, stack ) { |
211 | 213 | var renderers = es.Content.annotationRenderers, |
212 | 214 | type = annotation.type, |
213 | | - out = ''; |
| 215 | + out = '', |
| 216 | + i; |
214 | 217 | if ( type in renderers ) { |
215 | 218 | if ( bias === 'open' ) { |
216 | 219 | // Add annotation to the top of the stack |
217 | 220 | stack.push( annotation ); |
218 | 221 | // Open annotation |
219 | | - out += typeof renderers[type]['open'] === 'function' |
220 | | - ? renderers[type]['open']( annotation.data ) |
221 | | - : renderers[type]['open']; |
| 222 | + out += typeof renderers[type].open === 'function' ? |
| 223 | + renderers[type].open( annotation.data ) : renderers[type].open; |
222 | 224 | } else { |
223 | 225 | if ( stack[stack.length - 1] === annotation ) { |
224 | 226 | // Remove annotation from top of the stack |
225 | 227 | stack.pop(); |
226 | 228 | // Close annotation |
227 | | - out += typeof renderers[type]['close'] === 'function' |
228 | | - ? renderers[type]['close']( annotation.data ) |
229 | | - : renderers[type]['close']; |
| 229 | + out += typeof renderers[type].close === 'function' ? |
| 230 | + renderers[type].close( annotation.data ) : renderers[type].close; |
230 | 231 | } else { |
231 | 232 | // Find the annotation in the stack |
232 | 233 | var depth = stack.indexOf( annotation ); |
— | — | @@ -233,20 +234,20 @@ |
234 | 235 | throw 'Invalid stack error. An element is missing from the stack.'; |
235 | 236 | } |
236 | 237 | // Close each already opened annotation |
237 | | - for ( var i = stack.length - 1; i >= depth + 1; i-- ) { |
238 | | - out += typeof renderers[stack[i].type]['close'] === 'function' |
239 | | - ? renderers[stack[i].type]['close']( stack[i].data ) |
240 | | - : renderers[stack[i].type]['close']; |
| 238 | + for ( i = stack.length - 1; i >= depth + 1; i-- ) { |
| 239 | + out += typeof renderers[stack[i].type].close === 'function' ? |
| 240 | + renderers[stack[i].type].close( stack[i].data ) : |
| 241 | + renderers[stack[i].type].close; |
241 | 242 | } |
242 | 243 | // Close the buried annotation |
243 | | - out += typeof renderers[type]['close'] === 'function' |
244 | | - ? renderers[type]['close']( annotation.data ) |
245 | | - : renderers[type]['close']; |
| 244 | + out += typeof renderers[type].close === 'function' ? |
| 245 | + renderers[type].close( annotation.data ) : |
| 246 | + renderers[type].close; |
246 | 247 | // Re-open each previously opened annotation |
247 | | - for ( var i = depth + 1; i < stack.length; i++ ) { |
248 | | - out += typeof renderers[stack[i].type]['open'] === 'function' |
249 | | - ? renderers[stack[i].type]['open']( stack[i].data ) |
250 | | - : renderers[stack[i].type]['open']; |
| 248 | + for ( i = depth + 1; i < stack.length; i++ ) { |
| 249 | + out += typeof renderers[stack[i].type].open === 'function' ? |
| 250 | + renderers[stack[i].type].open( stack[i].data ) : |
| 251 | + renderers[stack[i].type].open; |
251 | 252 | } |
252 | 253 | // Remove the annotation from the middle of the stack |
253 | 254 | stack.splice( depth, 1 ); |
— | — | @@ -532,6 +533,7 @@ |
533 | 534 | } else { |
534 | 535 | range.normalize(); |
535 | 536 | } |
| 537 | + var i; |
536 | 538 | /* |
537 | 539 | * Because content data is an array of either strings containing a single character each or |
538 | 540 | * references to arrays containing a single character string followed by a series of references |
— | — | @@ -542,7 +544,7 @@ |
543 | 545 | * expensive to do on all content on every copy, so we only do it when we are going to modify |
544 | 546 | * the annotation information, and on as few annotated characters as possible. |
545 | 547 | */ |
546 | | - for ( var i = range.start; i < range.end; i++ ) { |
| 548 | + for ( i = range.start; i < range.end; i++ ) { |
547 | 549 | if ( typeof this.data[i] !== 'string' ) { |
548 | 550 | this.data[i] = this.data[i].slice( 0 ); |
549 | 551 | } |
— | — | @@ -563,7 +565,7 @@ |
564 | 566 | } |
565 | 567 | if ( method === 'add' ) { |
566 | 568 | var duplicate; |
567 | | - for ( var i = range.start; i < range.end; i++ ) { |
| 569 | + for ( i = range.start; i < range.end; i++ ) { |
568 | 570 | duplicate = -1; |
569 | 571 | if ( typeof this.data[i] === 'string' ) { |
570 | 572 | // Never annotate new lines |
— | — | @@ -585,7 +587,7 @@ |
586 | 588 | } |
587 | 589 | } |
588 | 590 | } else if ( method === 'remove' ) { |
589 | | - for ( var i = range.start; i < range.end; i++ ) { |
| 591 | + for ( i = range.start; i < range.end; i++ ) { |
590 | 592 | if ( typeof this.data[i] !== 'string' ) { |
591 | 593 | if ( annotation.type === 'all' ) { |
592 | 594 | // Remove all annotations by converting the annotated character to a plain |
— | — | @@ -659,8 +661,8 @@ |
660 | 662 | } |
661 | 663 | } |
662 | 664 | |
663 | | - out += right[0] in es.Content.htmlCharacters |
664 | | - ? es.Content.htmlCharacters[right[0]] : right[0]; |
| 665 | + out += right[0] in es.Content.htmlCharacters ? |
| 666 | + es.Content.htmlCharacters[right[0]] : right[0]; |
665 | 667 | left = right; |
666 | 668 | } |
667 | 669 | // close all remaining tags at the end of the content |
— | — | @@ -756,7 +758,7 @@ |
757 | 759 | |
758 | 760 | for ( i = 0; i < this.data.length; i++ ) { |
759 | 761 | |
760 | | - if ( line == null ) { |
| 762 | + if ( line === null ) { |
761 | 763 | line = { text : '' }; |
762 | 764 | } |
763 | 765 | |
— | — | @@ -799,7 +801,7 @@ |
800 | 802 | left = right; |
801 | 803 | } |
802 | 804 | |
803 | | - if ( line != null ) { |
| 805 | + if ( line !== null ) { |
804 | 806 | this.handleAnnotation( 'close', line, i - offset ); |
805 | 807 | lines.push( line ); |
806 | 808 | } |
Index: trunk/parsers/wikidom/lib/es/es.Document.HtmlSerializer.js |
— | — | @@ -109,7 +109,7 @@ |
110 | 110 | es.Document.HtmlSerializer.prototype.serializeTransclusion = function( transclusion ) { |
111 | 111 | var title = []; |
112 | 112 | if ( transclusion.namespace !== 'Main' ) { |
113 | | - title.push( transclusion.namespace ) |
| 113 | + title.push( transclusion.namespace ); |
114 | 114 | } |
115 | 115 | title.push( transclusion.title ); |
116 | 116 | title = title.join( ':' ); |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | for ( var l = 0, lMax = item.lists.length; l < lMax; l++ ) { |
131 | 131 | out.push( this.serializeList( item.lists[l] ) ); |
132 | 132 | } |
133 | | - out.push( es.Document.Serializer.buildXmlClosingTag( 'li' ) ) |
| 133 | + out.push( es.Document.Serializer.buildXmlClosingTag( 'li' ) ); |
134 | 134 | return out.join( '\n' ); |
135 | 135 | } else { |
136 | 136 | return es.Document.Serializer.buildXmlTag( 'li', {}, this.serializeLine( item.line ) ); |
— | — | @@ -137,15 +137,15 @@ |
138 | 138 | }; |
139 | 139 | |
140 | 140 | es.Document.HtmlSerializer.prototype.serializeLine = function( line ) { |
| 141 | + var as = new es.AnnotationSerializer(); |
| 142 | + function addXml( range, tag, attributes ) { |
| 143 | + as.add( |
| 144 | + range, |
| 145 | + es.Document.Serializer.buildXmlOpeningTag( tag, attributes ), |
| 146 | + es.Document.Serializer.buildXmlClosingTag( tag ) |
| 147 | + ); |
| 148 | + } |
141 | 149 | if ( 'annotations' in line && line.annotations.length ) { |
142 | | - var as = new es.AnnotationSerializer(); |
143 | | - function addXml( range, tag, attributes ) { |
144 | | - as.add( |
145 | | - range, |
146 | | - es.Document.Serializer.buildXmlOpeningTag( tag, attributes ), |
147 | | - es.Document.Serializer.buildXmlClosingTag( tag ) |
148 | | - ); |
149 | | - }; |
150 | 150 | for ( var a = 0, aMax = line.annotations.length; a < aMax; a++ ) { |
151 | 151 | var an = line.annotations[a]; |
152 | 152 | switch ( an.type ) { |
— | — | @@ -195,7 +195,7 @@ |
196 | 196 | /* Registration */ |
197 | 197 | |
198 | 198 | es.Document.serializers.html = function( doc, context, options ) { |
199 | | - var serializer = new es.Document.HtmlSerializer( context, options ) |
| 199 | + var serializer = new es.Document.HtmlSerializer( context, options ); |
200 | 200 | return serializer.serializeDocument( doc ); |
201 | 201 | }; |
202 | 202 | |
Index: trunk/parsers/wikidom/lib/es/es.EventEmitter.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | */ |
9 | 9 | es.EventEmitter = function() { |
10 | 10 | this.events = {}; |
11 | | -} |
| 11 | +}; |
12 | 12 | |
13 | 13 | /* Methods */ |
14 | 14 | |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | return this; |
106 | 106 | } |
107 | 107 | handlers.splice( i, 1 ); |
108 | | - if ( handlers.length == 0 ) { |
| 108 | + if ( handlers.length === 0 ) { |
109 | 109 | delete this.events[type]; |
110 | 110 | } |
111 | 111 | } |
Index: trunk/parsers/wikidom/lib/es/es.Cursor.js |
— | — | @@ -38,9 +38,12 @@ |
39 | 39 | clearInterval( this.blinkInterval ); |
40 | 40 | } |
41 | 41 | this.blinkInterval = setInterval( function( cursor ) { |
42 | | - cursor.$.css( 'display' ) == 'block' |
43 | | - ? cursor.$.hide() : cursor.$.show(); |
44 | | - }, 500, this ); |
| 42 | + if ( cursor.$.css( 'display' ) === 'block' ) { |
| 43 | + cursor.$.hide(); |
| 44 | + } else { |
| 45 | + cursor.$.show(); |
| 46 | + } |
| 47 | + }, 500 ); |
45 | 48 | }; |
46 | 49 | |
47 | 50 | /** |
Index: trunk/parsers/wikidom/lib/es/es.Document.WikitextSerializer.js |
— | — | @@ -98,8 +98,8 @@ |
99 | 99 | } |
100 | 100 | for ( var c = 0, cMax = row.length; c < cMax; c++ ) { |
101 | 101 | var type = types[row[c].type || 'data'], |
102 | | - attr = row[c].attributes |
103 | | - ? es.Document.Serializer.buildXmlAttributes( row[c].attributes ) + '|' : '' |
| 102 | + attr = row[c].attributes ? |
| 103 | + es.Document.Serializer.buildXmlAttributes( row[c].attributes ) + '|' : ''; |
104 | 104 | out.push( type + attr + this.serializeDocument( row[c].document, true ) ); |
105 | 105 | } |
106 | 106 | } |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | if ( transclusion.namespace === 'Main' ) { |
114 | 114 | title.push( '' ); |
115 | 115 | } else if ( transclusion.namespace !== 'Template' ) { |
116 | | - title.push( transclusion.namespace ) |
| 116 | + title.push( transclusion.namespace ); |
117 | 117 | } |
118 | 118 | title.push( transclusion.title ); |
119 | 119 | return '{{' + title.join( ':' ) + '}}'; |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | /* Registration */ |
168 | 168 | |
169 | 169 | es.Document.serializers.wikitext = function( doc, context, options ) { |
170 | | - var serializer = new es.Document.WikitextSerializer( context, options ) |
| 170 | + var serializer = new es.Document.WikitextSerializer( context, options ); |
171 | 171 | return serializer.serializeDocument( doc ); |
172 | 172 | }; |
173 | 173 | |
Index: trunk/parsers/wikidom/lib/es/es.Document.JsonSerializer.js |
— | — | @@ -23,11 +23,11 @@ |
24 | 24 | return 'null'; |
25 | 25 | } |
26 | 26 | switch ( value.constructor ) { |
27 | | - case ( new Array ).constructor: |
| 27 | + case [].constructor: |
28 | 28 | return 'array'; |
29 | | - case ( new Date ).constructor: |
| 29 | + case ( new Date() ).constructor: |
30 | 30 | return 'date'; |
31 | | - case ( new RegExp ).constructor: |
| 31 | + case ( new RegExp() ).constructor: |
32 | 32 | return 'regex'; |
33 | 33 | default: |
34 | 34 | return 'object'; |
— | — | @@ -43,7 +43,8 @@ |
44 | 44 | var type = es.Document.JsonSerializer.typeOf( data ); |
45 | 45 | |
46 | 46 | // Open object/array |
47 | | - var json = ''; |
| 47 | + var json = '', |
| 48 | + key; |
48 | 49 | if ( type === 'array' ) { |
49 | 50 | if (data.length === 0) { |
50 | 51 | // Empty array |
— | — | @@ -52,7 +53,7 @@ |
53 | 54 | json += '['; |
54 | 55 | } else { |
55 | 56 | var empty = true; |
56 | | - for ( var i in data ) { |
| 57 | + for ( key in data ) { |
57 | 58 | if ( data.hasOwnProperty( i ) ) { |
58 | 59 | empty = false; |
59 | 60 | break; |
— | — | @@ -66,29 +67,28 @@ |
67 | 68 | |
68 | 69 | // Iterate over items |
69 | 70 | var comma = false; |
70 | | - for ( var i in data ) { |
71 | | - if ( data.hasOwnProperty( i ) ) { |
72 | | - json += ( comma ? ',' : '' ) + '\n' + indention + this.options.indentWith |
73 | | - + ( type === 'array' ? '' : '"' + i + '"' + ': ' ); |
74 | | - switch ( es.Document.JsonSerializer.typeOf( data[i] ) ) { |
| 71 | + for ( key in data ) { |
| 72 | + if ( data.hasOwnProperty( key ) ) { |
| 73 | + json += ( comma ? ',' : '' ) + '\n' + indention + this.options.indentWith + |
| 74 | + ( type === 'array' ? '' : '"' + key + '"' + ': ' ); |
| 75 | + switch ( es.Document.JsonSerializer.typeOf( data[key] ) ) { |
75 | 76 | case 'array': |
76 | 77 | case 'object': |
77 | 78 | json += this.encode( |
78 | | - data[i], indention + this.options.indentWith |
| 79 | + data[key], indention + this.options.indentWith |
79 | 80 | ); |
80 | 81 | break; |
81 | 82 | case 'boolean': |
82 | 83 | case 'number': |
83 | | - json += data[i].toString(); |
| 84 | + json += data[key].toString(); |
84 | 85 | break; |
85 | 86 | case 'null': |
86 | 87 | json += 'null'; |
87 | 88 | break; |
88 | 89 | case 'string': |
89 | | - json += '"' + data[i] |
| 90 | + json += '"' + data[key] |
90 | 91 | .replace(/[\n]/g, '\\n') |
91 | | - .replace(/[\t]/g, '\\t') |
92 | | - + '"'; |
| 92 | + .replace(/[\t]/g, '\\t') + '"'; |
93 | 93 | break; |
94 | 94 | // Skip other types |
95 | 95 | } |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | /* Registration */ |
113 | 113 | |
114 | 114 | es.Document.serializers.json = function( doc, context, options ) { |
115 | | - var serializer = new es.Document.JsonSerializer( context, options ) |
| 115 | + var serializer = new es.Document.JsonSerializer( context, options ); |
116 | 116 | return serializer.serializeDocument( doc ); |
117 | 117 | }; |
118 | 118 | |
Index: trunk/parsers/wikidom/lib/es/es.Container.js |
— | — | @@ -60,8 +60,7 @@ |
61 | 61 | * @returns {Object} Last child object |
62 | 62 | */ |
63 | 63 | es.Container.prototype.last = function() { |
64 | | - return this._list.length |
65 | | - ? this._list[this._list.length - 1] : null; |
| 64 | + return this._list.length ? this._list[this._list.length - 1] : null; |
66 | 65 | }; |
67 | 66 | |
68 | 67 | /** |
Index: trunk/parsers/wikidom/lib/es/es.Selection.js |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | this.to = to; |
17 | 17 | this.start = from; |
18 | 18 | this.end = to; |
19 | | -} |
| 19 | +}; |
20 | 20 | |
21 | 21 | /* Methods */ |
22 | 22 | |
Index: trunk/parsers/wikidom/lib/es/es.ListBlock.js |
— | — | @@ -173,7 +173,7 @@ |
174 | 174 | return { |
175 | 175 | 'item' : this.list.items[i], |
176 | 176 | 'offset' : offset - globalOffset |
177 | | - } |
| 177 | + }; |
178 | 178 | } |
179 | 179 | globalOffset += itemLength + 1; |
180 | 180 | } |
— | — | @@ -366,11 +366,13 @@ |
367 | 367 | }; |
368 | 368 | |
369 | 369 | es.ListBlock.prototype.getWikiDom = function() { |
370 | | - var items = this.list.items; |
371 | | - var stack = []; |
372 | | - var lastStyle = null; |
| 370 | + var items = this.list.items, |
| 371 | + stack = [], |
| 372 | + lastStyle = null, |
| 373 | + i, |
| 374 | + j; |
373 | 375 | |
374 | | - for ( var i = 0; i < items.length; i++ ) { |
| 376 | + for ( i = 0; i < items.length; i++ ) { |
375 | 377 | var item = items[i]; |
376 | 378 | var itemLevel = item.getLevel(); |
377 | 379 | |
— | — | @@ -385,7 +387,7 @@ |
386 | 388 | |
387 | 389 | // if the current element level is higher than the previous one |
388 | 390 | if ( itemLevel + 1 > stack.length ) { |
389 | | - for ( var j = stack.length; j < itemLevel + 1; j++ ) { |
| 391 | + for ( j = stack.length; j < itemLevel + 1; j++ ) { |
390 | 392 | stack.push( { |
391 | 393 | 'style' : item.getStyle(j), |
392 | 394 | 'items' : [] |
— | — | @@ -395,7 +397,7 @@ |
396 | 398 | |
397 | 399 | // if the current element level is lower then the previous one |
398 | 400 | if ( itemLevel + 1 < stack.length ) { |
399 | | - for ( var j = stack.length; j > itemLevel + 1; j-- ) { |
| 401 | + for ( j = stack.length; j > itemLevel + 1; j-- ) { |
400 | 402 | stack = es.ListBlock.wikiDomPushPop( stack ); |
401 | 403 | } |
402 | 404 | } |
— | — | @@ -407,7 +409,7 @@ |
408 | 410 | } |
409 | 411 | } |
410 | 412 | |
411 | | - for ( var i = stack.length; i > 1; i-- ) { |
| 413 | + for ( i = stack.length; i > 1; i-- ) { |
412 | 414 | stack = es.ListBlock.wikiDomPushPop( stack ); |
413 | 415 | } |
414 | 416 | |
Index: trunk/parsers/wikidom/lib/es/es.Document.Serializer.js |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | if ( escape ) { |
65 | 65 | value = wiki.util.xml.esc( value ); |
66 | 66 | } |
67 | | - return '<' + tag + es.Document.Serializer.buildXmlAttributes( attributes, true ) + '>' |
68 | | - + value + '</' + tag + '>'; |
| 67 | + return '<' + tag + es.Document.Serializer.buildXmlAttributes( attributes, true ) + '>' + |
| 68 | + value + '</' + tag + '>'; |
69 | 69 | } |
70 | 70 | }; |
Index: trunk/parsers/wikidom/lib/es/es.Surface.js |
— | — | @@ -118,12 +118,12 @@ |
119 | 119 | // First render |
120 | 120 | this.$.append( this.doc.$ ); |
121 | 121 | this.doc.renderBlocks(); |
122 | | -} |
| 122 | +}; |
123 | 123 | |
124 | 124 | es.Surface.prototype.getLocationFromEvent = function( e ) { |
125 | 125 | var $target = $( e.target ), |
126 | | - $block = $target.is( '.editSurface-block' ) |
127 | | - ? $target : $target.closest( '.editSurface-block' ); |
| 126 | + $block = $target.is( '.editSurface-block' ) ? |
| 127 | + $target : $target.closest( '.editSurface-block' ); |
128 | 128 | // Not a block or child of a block? Find the nearest block... |
129 | 129 | if( !$block.length ) { |
130 | 130 | var $blocks = this.$.find( '> .editSurface-document .editSurface-block' ); |
— | — | @@ -143,10 +143,11 @@ |
144 | 144 | }; |
145 | 145 | |
146 | 146 | es.Surface.prototype.onKeyDown = function( e ) { |
| 147 | + var range; |
147 | 148 | switch ( e.keyCode ) { |
148 | 149 | case 36: // Home |
149 | 150 | this.initialHorizontalCursorPosition = null; |
150 | | - var range = this.location.block.getLineBoundaries( this.location.offset ); |
| 151 | + range = this.location.block.getLineBoundaries( this.location.offset ); |
151 | 152 | this.location = new es.Location( this.location.block, range.start ); |
152 | 153 | this.cursor.show( |
153 | 154 | this.location.block.getPosition( this.location.offset ), |
— | — | @@ -161,7 +162,7 @@ |
162 | 163 | break; |
163 | 164 | case 35: // End |
164 | 165 | this.initialHorizontalCursorPosition = null; |
165 | | - var range = this.location.block.getLineBoundaries( this.location.offset ); |
| 166 | + range = this.location.block.getLineBoundaries( this.location.offset ); |
166 | 167 | this.location = new es.Location( this.location.block, range.end ); |
167 | 168 | this.cursor.show( |
168 | 169 | this.location.block.getPosition( this.location.offset ), |
— | — | @@ -317,14 +318,15 @@ |
318 | 319 | }; |
319 | 320 | |
320 | 321 | es.Surface.prototype.handleBackspace = function() { |
| 322 | + var deleteSelection; |
321 | 323 | if ( this.selection.from && this.selection.to ) { |
322 | | - var deleteSelection = this.selection; |
| 324 | + deleteSelection = this.selection; |
323 | 325 | deleteSelection.normalize(); |
324 | 326 | this.location = this.selection.start; |
325 | 327 | this.selection = new es.Selection(); |
326 | 328 | this.deleteContent( deleteSelection ); |
327 | 329 | } else if ( this.location.offset > 0 ) { |
328 | | - var deleteSelection = new es.Selection( |
| 330 | + deleteSelection = new es.Selection( |
329 | 331 | new es.Location( this.location.block, this.location.offset - 1 ), this.location |
330 | 332 | ); |
331 | 333 | deleteSelection.normalize(); |
— | — | @@ -335,14 +337,15 @@ |
336 | 338 | }; |
337 | 339 | |
338 | 340 | es.Surface.prototype.handleDelete = function() { |
| 341 | + var deleteSelection; |
339 | 342 | if ( this.selection.from && this.selection.to ) { |
340 | | - var deleteSelection = this.selection; |
| 343 | + deleteSelection = this.selection; |
341 | 344 | deleteSelection.normalize(); |
342 | 345 | this.location = this.selection.start; |
343 | 346 | this.selection = new es.Selection(); |
344 | 347 | this.deleteContent( deleteSelection ); |
345 | 348 | } else if ( this.location.offset < this.location.block.getLength() ) { |
346 | | - var deleteSelection = new es.Selection( |
| 349 | + deleteSelection = new es.Selection( |
347 | 350 | new es.Location( this.location.block, this.location.offset + 1 ), this.location |
348 | 351 | ); |
349 | 352 | deleteSelection.normalize(); |
— | — | @@ -371,6 +374,7 @@ |
372 | 375 | this.mouse.clickPosition = clickPosition; |
373 | 376 | } |
374 | 377 | this.location = this.getLocationFromEvent( e ); |
| 378 | + var boundaries; |
375 | 379 | switch ( this.mouse.clicks ) { |
376 | 380 | case 1: |
377 | 381 | if ( this.keyboard.keys.shift ) { |
— | — | @@ -388,7 +392,7 @@ |
389 | 393 | break; |
390 | 394 | case 2: |
391 | 395 | // Select word offset is within |
392 | | - var boundaries = this.location.block.getWordBoundaries( this.location.offset ); |
| 396 | + boundaries = this.location.block.getWordBoundaries( this.location.offset ); |
393 | 397 | this.selection = new es.Selection( |
394 | 398 | new es.Location( this.location.block, boundaries.start ), |
395 | 399 | new es.Location( this.location.block, boundaries.end ) |
— | — | @@ -397,7 +401,7 @@ |
398 | 402 | break; |
399 | 403 | case 3: |
400 | 404 | // Select section within block offset is within |
401 | | - var boundaries = this.location.block.getSectionBoundaries( this.location.offset ); |
| 405 | + boundaries = this.location.block.getSectionBoundaries( this.location.offset ); |
402 | 406 | this.selection = new es.Selection( |
403 | 407 | new es.Location( this.location.block, boundaries.start ), |
404 | 408 | new es.Location( this.location.block, boundaries.end ) |
— | — | @@ -542,8 +546,8 @@ |
543 | 547 | 'top': fromBlockOffset.top + from.position.bottom, |
544 | 548 | 'left': blockLeft, |
545 | 549 | 'width': blockWidth, |
546 | | - 'height': ( toBlockOffset.top + to.position.top ) |
547 | | - - ( fromBlockOffset.top + from.position.bottom ) |
| 550 | + 'height': ( toBlockOffset.top + to.position.top ) - |
| 551 | + ( fromBlockOffset.top + from.position.bottom ) |
548 | 552 | } ) |
549 | 553 | .show(); |
550 | 554 | // TODO: Get text from multiple-block selection |
Index: trunk/parsers/wikidom/demos/synth/es.js |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | 'type': 'xlink', |
120 | 120 | 'data': { 'href': '#' }, |
121 | 121 | 'range': { 'start': 22, 'end': 29 } |
122 | | - }, |
| 122 | + } |
123 | 123 | ] |
124 | 124 | } |
125 | 125 | }, |
Index: trunk/parsers/wikidom/demos/synth/index.html |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<!doctype html> |
| 2 | +<!DOCTYPE html> |
3 | 3 | |
4 | 4 | <html> |
5 | 5 | <head> |
Index: trunk/parsers/wikidom/demos/es/es.js |
— | — | @@ -16,10 +16,10 @@ |
17 | 17 | 'type': 'xlink', |
18 | 18 | 'data': { 'href': '#' }, |
19 | 19 | 'range': { 'start': 22, 'end': 29 } |
20 | | - }, |
| 20 | + } |
21 | 21 | ] |
22 | 22 | }, |
23 | | - { 'text': "Word wrap is the additional feature of most text editors, word processors, and web browsers, of breaking lines between and not within words, except when a single word is longer than a line." }, |
| 23 | + { 'text': "Word wrap is the additional feature of most text editors, word processors, and web browsers, of breaking lines between and not within words, except when a single word is longer than a line." } |
24 | 24 | ] |
25 | 25 | }, |
26 | 26 | { |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | } |
40 | 40 | ] |
41 | 41 | }, |
42 | | - { 'text': "A soft return is the break resulting from line wrap or word wrap, whereas a hard return is an intentional break, creating a new paragraph." }, |
| 42 | + { 'text': "A soft return is the break resulting from line wrap or word wrap, whereas a hard return is an intentional break, creating a new paragraph." } |
43 | 43 | ] |
44 | 44 | }, |
45 | 45 | { |
Index: trunk/parsers/wikidom/demos/es/index.html |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<!doctype html> |
| 2 | +<!DOCTYPE html> |
3 | 3 | |
4 | 4 | <html> |
5 | 5 | <head> |
Index: trunk/parsers/wikidom/demos/surface/jquery.flow.js |
— | — | @@ -39,18 +39,18 @@ |
40 | 40 | if ( typeof to === 'undefined' ) { |
41 | 41 | to = {}; |
42 | 42 | } |
43 | | - if ( from == null || typeof from != 'object' ) { |
| 43 | + if ( from === null || typeof from != 'object' ) { |
44 | 44 | return from; |
45 | 45 | } |
46 | 46 | if ( from.constructor != Object && from.constructor != Array ) { |
47 | 47 | return from; |
48 | 48 | } |
49 | | - if ( from.constructor == Date |
50 | | - || from.constructor == RegExp |
51 | | - || from.constructor == Function |
52 | | - || from.constructor == String |
53 | | - || from.constructor == Number |
54 | | - || from.constructor == Boolean ) { |
| 49 | + if ( from.constructor == Date || |
| 50 | + from.constructor == RegExp || |
| 51 | + from.constructor == Function || |
| 52 | + from.constructor == String || |
| 53 | + from.constructor == Number || |
| 54 | + from.constructor == Boolean ) { |
55 | 55 | return new from.constructor( from ); |
56 | 56 | } |
57 | 57 | to = to || new from.constructor(); |
Index: trunk/parsers/wikidom/demos/surface/jquery.editSurface.js |
— | — | @@ -14,9 +14,9 @@ |
15 | 15 | .addClass( 'editSurface-container' ) |
16 | 16 | .append( '<div class="editSurface-document"></div>' ) |
17 | 17 | .after( '<div class="editSurface-cursor"></div>' ) |
18 | | - .before( '<div class="editSurface-range"></div>' |
19 | | - + '<div class="editSurface-range"></div>' |
20 | | - + '<div class="editSurface-range"></div>'); |
| 18 | + .before( '<div class="editSurface-range"></div>' + |
| 19 | + '<div class="editSurface-range"></div>' + |
| 20 | + '<div class="editSurface-range"></div>'); |
21 | 21 | |
22 | 22 | // Shortcuts |
23 | 23 | var $document = $this.find( '.editSurface-document' ); |
— | — | @@ -63,8 +63,8 @@ |
64 | 64 | }, |
65 | 65 | 'mouseup': function( e ) { |
66 | 66 | if ( sel.active ) { |
67 | | - if ( !sel.from || !sel.to |
68 | | - || ( sel.from.line === sel.to.line && sel.from.char === sel.to.char ) ) { |
| 67 | + if ( !sel.from || !sel.to || |
| 68 | + ( sel.from.line === sel.to.line && sel.from.char === sel.to.char ) ) { |
69 | 69 | sel.from = null; |
70 | 70 | sel.to = null; |
71 | 71 | sel.start = null; |
— | — | @@ -84,9 +84,9 @@ |
85 | 85 | $target = getNearestLine( sel.start.$target.parent().children(), e.pageY ); |
86 | 86 | } |
87 | 87 | sel.end = getCursorPosition( e.pageX, e.pageY, $target ); |
88 | | - if ( sel.start.line < sel.end.line |
89 | | - || ( sel.start.line === sel.end.line |
90 | | - && sel.start.char < sel.end.char ) ) { |
| 88 | + if ( sel.start.line < sel.end.line || |
| 89 | + ( sel.start.line === sel.end.line && |
| 90 | + sel.start.char < sel.end.char ) ) { |
91 | 91 | sel.from = sel.start; |
92 | 92 | sel.to = sel.end; |
93 | 93 | } else { |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | text = sel.from.$target.data( 'flow' ).text.substr( sel.from.char ); |
133 | 133 | var $sibling = sel.from.$target.next(); |
134 | 134 | for ( var i = sel.from.line + 1; i < sel.to.line; i++ ) { |
135 | | - text += $sibling.data( 'flow' ).text |
| 135 | + text += $sibling.data( 'flow' ).text; |
136 | 136 | $sibling = $sibling.next(); |
137 | 137 | } |
138 | 138 | text += sel.to.$target.data( 'flow' ).text.substr( 0, sel.to.char ); |
— | — | @@ -203,8 +203,8 @@ |
204 | 204 | ranges.$first.show().css( { |
205 | 205 | 'left': sel.from.x, |
206 | 206 | 'top': sel.from.top, |
207 | | - 'width': ( $container.innerWidth() - sel.from.x ) |
208 | | - + $container.offset().left, |
| 207 | + 'width': ( $container.innerWidth() - sel.from.x ) + |
| 208 | + $container.offset().left, |
209 | 209 | 'height': sel.from.height |
210 | 210 | } ); |
211 | 211 | if ( sel.from.line < sel.to.line - 1 ) { |
— | — | @@ -235,10 +235,8 @@ |
236 | 236 | function renderDocument( doc ) { |
237 | 237 | $document.empty(); |
238 | 238 | for ( var i = 0; i < doc.blocks.length; i++ ) { |
239 | | - switch ( doc.blocks[i].type ) { |
240 | | - case 'paragraph': |
241 | | - renderParagraph( doc.blocks[i], $document ) |
242 | | - break; |
| 239 | + if ( doc.blocks[i].type === 'paragraph' ) { |
| 240 | + renderParagraph( doc.blocks[i], $document ); |
243 | 241 | } |
244 | 242 | } |
245 | 243 | } |
— | — | @@ -269,10 +267,14 @@ |
270 | 268 | // Flip |
271 | 269 | cursor.visible = !cursor.visible; |
272 | 270 | // Hide/show |
273 | | - cursor.visible ? cursor.$.hide() : cursor.$.show(); |
| 271 | + if ( cursor.visible ) { |
| 272 | + cursor.$.hide(); |
| 273 | + } else { |
| 274 | + cursor.$.show(); |
| 275 | + } |
274 | 276 | // Repeat |
275 | | - cursor.timeout = setTimeout( cursor.blink, cursor.speed ) |
276 | | - } |
| 277 | + cursor.timeout = setTimeout( cursor.blink, cursor.speed ); |
| 278 | + }; |
277 | 279 | cursor.show = function() { |
278 | 280 | // Start visible (will flip when run) |
279 | 281 | cursor.visible = true; |
Index: trunk/parsers/wikidom/demos/surface/index.html |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<!doctype html> |
| 2 | +<!DOCTYPE html> |
3 | 3 | |
4 | 4 | <html> |
5 | 5 | <head> |
Index: trunk/parsers/wikidom/demos/renderers/index.html |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<!doctype html> |
| 2 | +<!DOCTYPE html> |
3 | 3 | |
4 | 4 | <html> |
5 | 5 | <head> |