r96019 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96018‎ | r96019 | r96020 >
Date:18:08, 1 September 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed lots of syntax errors, accidental globals, and incorrect pathnames
Modified paths:
  • /trunk/parsers/wikidom/demos/es/es.js (modified) (history)
  • /trunk/parsers/wikidom/demos/renderers/document.js (deleted) (history)
  • /trunk/parsers/wikidom/demos/renderers/document.json (added) (history)
  • /trunk/parsers/wikidom/demos/renderers/index.html (modified) (history)
  • /trunk/parsers/wikidom/demos/surface/jquery.editSurface.js (modified) (history)
  • /trunk/parsers/wikidom/demos/surface/jquery.flow.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Content.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.ContentFlow.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Surface.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/models/es.ContentModel.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/models/es.DocumentModel.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/models/es.TableBlockModel.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/models/es.TableBlockRowModel.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/views/es.ContentView.js (modified) (history)
  • /trunk/parsers/wikidom/tests/serializers/test.js (modified) (history)
  • /trunk/parsers/wikidom/tests/synth/index.html (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/tests/synth/index.html
@@ -11,9 +11,9 @@
1212 <h2 id="qunit-userAgent"></h2>
1313 <ol id="qunit-tests"></ol>
1414 <script src="../../lib/synth/es.js"></script>
15 - <script src="../../lib/synth/es.EventEmitter.js"></script>
16 - <script src="../../lib/synth/es.Container.js"></script>
17 - <script src="../../lib/synth/es.ContainerItem.js"></script>
 15+ <script src="../../lib/synth/bases/es.EventEmitter.js"></script>
 16+ <script src="../../lib/synth/bases/es.Container.js"></script>
 17+ <script src="../../lib/synth/bases/es.ContainerItem.js"></script>
1818 <script src="../../lib/jquery.js"></script>
1919 <script src="../../lib/qunit.js"></script>
2020 <script src="test.js"></script>
Index: trunk/parsers/wikidom/tests/serializers/test.js
@@ -54,7 +54,7 @@
5555 {
5656 'subject': 'horizontal rule',
5757 'dom': { 'blocks': [ {
58 - 'type': 'horizontal-rule',
 58+ 'type': 'horizontal-rule'
5959 } ] },
6060 'html': '<hr />',
6161 'wikitext': '----'
Index: trunk/parsers/wikidom/lib/synth/models/es.DocumentModel.js
@@ -30,7 +30,7 @@
3131 // Blocks - if given, convert all plain "block" objects to es.WikiDom* objects
3232 !$.isArray( obj.blocks ) ? [] : $.map( obj.blocks, function( block ) {
3333 return es.BlockModel.newFromPlainObject( block );
34 - },
 34+ } ),
3535 // Attributes - if given, make a deep copy of attributes
3636 !$.isPlainObject( obj.attributes ) ? {} : $.extend( true, {}, obj.attributes )
3737 );
Index: trunk/parsers/wikidom/lib/synth/models/es.TableBlockModel.js
@@ -28,7 +28,7 @@
2929 // Cells - if given, convert plain "item" objects to es.ListModelItem objects
3030 !$.isArray( obj.rows ) ? [] : $.map( obj.rows, function( row ) {
3131 return !$.isPlainObject( row ) ? null : es.TableBlockRowModel.newFromPlainObject( row )
32 - } )
 32+ } ),
3333 // Attributes - if given, make a deep copy of attributes
3434 !$.isPlainObject( obj.attributes ) ? {} : $.extend( true, {}, obj.attributes )
3535 );
@@ -60,7 +60,7 @@
6161 } );
6262 }
6363 if ( !$.isEmptyObject( this.attributes ) ) {
64 - obj.attributes = $.extend( true, {}. this.attributes );
 64+ obj.attributes = $.extend( true, {}, this.attributes );
6565 }
6666 return obj;
6767 };
Index: trunk/parsers/wikidom/lib/synth/models/es.ContentModel.js
@@ -213,11 +213,11 @@
214214 for ( var i = 0; i < this.data.length; i++ ) {
215215 if ( this.data[i].length > 1 ) {
216216 for ( var j = 1; j < this.data[i].length; j++ ) {
217 - var float = es.Content.annotationRenderers[this.data[i][j].type].float;
218 - if ( float && typeof float === 'function' ) {
219 - float = float( this.data[i][j].data );
 217+ var isFloating = es.Content.annotationRenderers[this.data[i][j].type].float;
 218+ if ( isFloating && typeof isFloating === 'function' ) {
 219+ isFloating = isFloating( this.data[i][j].data );
220220 }
221 - if ( float ) {
 221+ if ( isFloating ) {
222222 return true;
223223 }
224224 }
@@ -239,18 +239,18 @@
240240 }
241241 var start = offset,
242242 end = offset,
243 - char;
 243+ character;
244244 while ( start > 0 ) {
245245 start--;
246 - char = ( typeof this.data[start] === 'string' ? this.data[start] : this.data[start][0] );
247 - if ( char.match( /\B/ ) ) {
 246+ character = ( typeof this.data[start] === 'string' ? this.data[start] : this.data[start][0] );
 247+ if ( character.match( /\B/ ) ) {
248248 start++;
249249 break;
250250 }
251251 }
252252 while ( end < this.data.length ) {
253 - char = ( typeof this.data[end] === 'string' ? this.data[end] : this.data[end][0] );
254 - if ( char.match( /\B/ ) ) {
 253+ character = ( typeof this.data[end] === 'string' ? this.data[end] : this.data[end][0] );
 254+ if ( character.match( /\B/ ) ) {
255255 break;
256256 }
257257 end++;
Index: trunk/parsers/wikidom/lib/synth/models/es.TableBlockRowModel.js
@@ -25,7 +25,7 @@
2626 // Cells - if given, convert plain "item" objects to es.ListModelItem objects
2727 !$.isArray( obj.cells ) ? [] : $.map( obj.cells, function( cell ) {
2828 return !$.isPlainObject( cell ) ? null : es.DocumentModel.newFromPlainObject( cell )
29 - } )
 29+ } ),
3030 // Attributes - if given, make a deep copy of attributes
3131 !$.isPlainObject( obj.attributes ) ? {} : $.extend( true, {}, obj.attributes )
3232 );
@@ -57,7 +57,7 @@
5858 } );
5959 }
6060 if ( !$.isEmptyObject( this.attributes ) ) {
61 - obj.attributes = $.extend( true, {}. this.attributes );
 61+ obj.attributes = $.extend( true, {}, this.attributes );
6262 }
6363 return obj;
6464 };
Index: trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js
@@ -45,7 +45,7 @@
4646
4747 es.ContentSeries.prototype.size = function() {
4848 var sum = 0;
49 - for ( var i = 0, length = this.length; i++ ) {
 49+ for ( var i = 0, length = this.length; i < length; i++ ) {
5050 sum += this[i].getLength();
5151 }
5252 return sum;
Index: trunk/parsers/wikidom/lib/synth/views/es.ContentView.js
@@ -547,8 +547,8 @@
548548 */
549549 es.ContentView.prototype.appendLine = function( range, wordOffset, fractional ) {
550550 var rs = this.renderState,
551 - lineCount = rs.lines.length;
552 - $line = this.$.children( '[line-index=' + lineCount + ']' );
 551+ lineCount = rs.lines.length,
 552+ $line = this.$.children( '[line-index=' + lineCount + ']' );
553553 if ( !$line.length ) {
554554 $line = $( '<div class="editSurface-line" line-index="' + lineCount + '"></div>' );
555555 this.$.append( $line );
@@ -600,6 +600,7 @@
601601 end = range.end,
602602 charOffset = this.boundaries[offset],
603603 middle,
 604+ charMiddle,
604605 lineWidth,
605606 cacheKey;
606607 do {
Index: trunk/parsers/wikidom/lib/es/es.ContentFlow.js
@@ -415,8 +415,8 @@
416416 */
417417 es.ContentFlow.prototype.appendLine = function( range, wordOffset, fractional ) {
418418 var rs = this.renderState,
419 - lineCount = rs.lines.length;
420 - $line = this.$.children( '[line-index=' + lineCount + ']' );
 419+ lineCount = rs.lines.length,
 420+ $line = this.$.children( '[line-index=' + lineCount + ']' );
421421 if ( !$line.length ) {
422422 $line = $( '<div class="editSurface-line" line-index="' + lineCount + '"></div>' );
423423 this.$.append( $line );
@@ -468,6 +468,7 @@
469469 end = range.end,
470470 charOffset = this.boundaries[offset],
471471 middle,
 472+ charMiddle,
472473 lineWidth,
473474 cacheKey;
474475 do {
Index: trunk/parsers/wikidom/lib/es/es.Content.js
@@ -370,11 +370,11 @@
371371 for ( var i = 0; i < this.data.length; i++ ) {
372372 if ( this.data[i].length > 1 ) {
373373 for ( var j = 1; j < this.data[i].length; j++ ) {
374 - var float = es.Content.annotationRenderers[this.data[i][j].type].float;
375 - if ( float && typeof float === 'function' ) {
376 - float = float( this.data[i][j].data );
 374+ var isFloating = es.Content.annotationRenderers[this.data[i][j].type].float;
 375+ if ( isFloating && typeof isFloating === 'function' ) {
 376+ isFloating = isFloating( this.data[i][j].data );
377377 }
378 - if ( float ) {
 378+ if ( isFloating ) {
379379 return true;
380380 }
381381 }
@@ -685,18 +685,18 @@
686686 }
687687 var start = offset,
688688 end = offset,
689 - char;
 689+ character;
690690 while ( start > 0 ) {
691691 start--;
692 - char = ( typeof this.data[start] === 'string' ? this.data[start] : this.data[start][0] );
693 - if ( char.match( /\B/ ) ) {
 692+ character = ( typeof this.data[start] === 'string' ? this.data[start] : this.data[start][0] );
 693+ if ( character.match( /\B/ ) ) {
694694 start++;
695695 break;
696696 }
697697 }
698698 while ( end < this.data.length ) {
699 - char = ( typeof this.data[end] === 'string' ? this.data[end] : this.data[end][0] );
700 - if ( char.match( /\B/ ) ) {
 699+ character = ( typeof this.data[end] === 'string' ? this.data[end] : this.data[end][0] );
 700+ if ( character.match( /\B/ ) ) {
701701 break;
702702 }
703703 end++;
Index: trunk/parsers/wikidom/lib/es/es.Surface.js
@@ -83,7 +83,7 @@
8484 },
8585 'keyup.editSurface' : function( e ) {
8686 return surface.onKeyUp( e );
87 - },
 87+ }
8888 });
8989 },
9090 'blur': function( e ) {
@@ -121,12 +121,12 @@
122122 }
123123
124124 es.Surface.prototype.getLocationFromEvent = function( e ) {
125 - var $target = $( e.target );
 125+ var $target = $( e.target ),
126126 $block = $target.is( '.editSurface-block' )
127127 ? $target : $target.closest( '.editSurface-block' );
128128 // Not a block or child of a block? Find the nearest block...
129129 if( !$block.length ) {
130 - $blocks = this.$.find( '> .editSurface-document .editSurface-block' );
 130+ var $blocks = this.$.find( '> .editSurface-document .editSurface-block' );
131131 $block = $blocks.first();
132132 $blocks.each( function() {
133133 // Stop looking when mouse is above top
Index: trunk/parsers/wikidom/demos/es/es.js
@@ -1,6 +1,6 @@
22 $(document).ready( function() {
33 var showData = false;
4 - doc = es.Document.newFromWikiDomDocument( { 'blocks': [
 4+ var doc = es.Document.newFromWikiDomDocument( { 'blocks': [
55 {
66 "type": "paragraph",
77 "lines": [
Index: trunk/parsers/wikidom/demos/surface/jquery.flow.js
@@ -61,15 +61,15 @@
6262 }
6363
6464 $.flow = {
65 - 'charCache': {},
 65+ 'characterCache': {},
6666 'wordCache': {},
6767 'measureWord': function( text, ruler ) {
6868 if ( typeof $.flow.wordCache[text] === 'undefined' ) {
6969 // Cache miss
7070 var word = { 'text': text, 'html': '', 'metrics': [] };
7171 for ( var i = 0; i < text.length; i++ ) {
72 - var char = text[i],
73 - charHtml = char
 72+ var character = text[i],
 73+ characterHtml = character
7474 .replace( '&', '&amp;' )
7575 .replace( ' ', '&nbsp;' )
7676 .replace( '<', '&lt;' )
@@ -78,15 +78,15 @@
7979 .replace( '"', '&quot;' )
8080 .replace( '\n', '<span class="editSurface-whitespace">\\n</span>' )
8181 .replace( '\t', '<span class="editSurface-whitespace">\\t</span>' );
82 - word.html += charHtml;
83 - if ( typeof $.flow.charCache[char] === 'undefined' ) {
 82+ word.html += characterHtml;
 83+ if ( typeof $.flow.characterCache[character] === 'undefined' ) {
8484 // Cache miss
85 - ruler.innerHTML = charHtml;
86 - word.metrics.push( $.flow.charCache[char] = ruler.clientWidth );
 85+ ruler.innerHTML = characterHtml;
 86+ word.metrics.push( $.flow.characterCache[character] = ruler.clientWidth );
8787 continue;
8888 }
8989 // Cache hit
90 - word.metrics.push( $.flow.charCache[char] );
 90+ word.metrics.push( $.flow.characterCache[character] );
9191 }
9292 ruler.innerHTML = word.html;
9393 word.width = ruler.clientWidth;
@@ -116,7 +116,7 @@
117117 'getLines': function( words, width ) {
118118 // Lineify
119119 var lineCount = 0,
120 - charCount = 0,
 120+ characterCount = 0,
121121 wordCount = 0,
122122 lines = [],
123123 line = {
@@ -130,7 +130,7 @@
131131 for ( var i = 0; i < words.length; i++ ) {
132132 if ( line.width + words[i].width > width ) {
133133 lines.push( line );
134 - charCount = 0;
 134+ characterCount = 0;
135135 wordCount = 0;
136136 lineCount++;
137137 line = {
@@ -144,8 +144,8 @@
145145 }
146146 words[i].index = wordCount;
147147 wordCount++;
148 - words[i].offset = charCount;
149 - charCount += words[i].text.length;
 148+ words[i].offset = characterCount;
 149+ characterCount += words[i].text.length;
150150 line.words.push( words[i] );
151151 line.text += words[i].text;
152152 line.html += words[i].html;
Index: trunk/parsers/wikidom/demos/surface/jquery.editSurface.js
@@ -1,6 +1,6 @@
22 $.fn.editSurface = function( options ) {
33 var $this = $(this);
4 - sel = {
 4+ var sel = {
55 'active': false
66 };
77
Index: trunk/parsers/wikidom/demos/renderers/document.js
@@ -1,227 +0,0 @@
2 -{
3 - "blocks": [
4 - {
5 - "type": "heading",
6 - "level": 2,
7 - "line": {
8 - "text": "This is a heading",
9 - "annotations": [
10 - {
11 - "type": "italic",
12 - "range": {
13 - "start": 10,
14 - "end": 17
15 - }
16 - }
17 - ]
18 - }
19 - },
20 - {
21 - "type": "rule"
22 - },
23 - {
24 - "type": "comment",
25 - "text": "Hello wild world of wikitext!"
26 - },
27 - {
28 - "type": "table",
29 - "attributes": {
30 - "class": "wikitable",
31 - "width": "50%"
32 - },
33 - "rows": [
34 - [
35 - {
36 - "type": "heading",
37 - "document": {
38 - "blocks": [
39 - {
40 - "type": "paragraph",
41 - "lines": [
42 - {
43 - "text": "This is a table heading"
44 - }
45 - ]
46 - }
47 - ]
48 - }
49 - }
50 - ],
51 - [
52 - {
53 - "type": "data",
54 - "document": {
55 - "blocks": [
56 - {
57 - "type": "paragraph",
58 - "lines": [
59 - {
60 - "text": "This is a table cell"
61 - }
62 - ]
63 - },
64 - {
65 - "type": "paragraph",
66 - "lines": [
67 - {
68 - "text": "This is another paragraph in a table cell"
69 - }
70 - ]
71 - }
72 - ]
73 - }
74 - }
75 - ]
76 - ]
77 - },
78 - {
79 - "type": "paragraph",
80 - "lines": [
81 - {
82 - "text": "This is a test paragraph!",
83 - "annotations": [
84 - {
85 - "type": "italic",
86 - "range": {
87 - "start": 0,
88 - "end": 4
89 - }
90 - },
91 - {
92 - "type": "xlink",
93 - "range": {
94 - "start": 8,
95 - "end": 22
96 - },
97 - "data": {
98 - "url": "http://www.a.com"
99 - }
100 - },
101 - {
102 - "type": "bold",
103 - "range": {
104 - "start": 10,
105 - "end": 14
106 - }
107 - }
108 - ]
109 - },
110 - {
111 - "text": "Paragraphs can have more than one line.",
112 - "annotations": [
113 - {
114 - "type": "italic",
115 - "range": {
116 - "start": 11,
117 - "end": 14
118 - }
119 - },
120 - {
121 - "type": "bold",
122 - "range": {
123 - "start": 20,
124 - "end": 24
125 - }
126 - }
127 - ]
128 - }
129 - ]
130 - },
131 - {
132 - "type": "paragraph",
133 - "lines": [
134 - {
135 - "text": "Documents can have one or more blocks.",
136 - "annotations": [
137 - {
138 - "type": "bold",
139 - "range": {
140 - "start": 0,
141 - "end": 9
142 - }
143 - }
144 - ]
145 - }
146 - ]
147 - },
148 - {
149 - "type": "list",
150 - "style": "number",
151 - "items": [
152 - {
153 - "line": {
154 - "text": "First item"
155 - },
156 - "lists": [
157 - {
158 - "type": "list",
159 - "style": "bullet",
160 - "items": [
161 - {
162 - "line": {
163 - "text": "First sub-item"
164 - }
165 - },
166 - {
167 - "line": {
168 - "text": "Second sub-item"
169 - }
170 - },
171 - {
172 - "line": {
173 - "text": "Third sub-item"
174 - }
175 - }
176 - ]
177 - }
178 - ]
179 - },
180 - {
181 - "line": {
182 - "text": "Second item",
183 - "annotations": [
184 - {
185 - "type": "italic",
186 - "range": {
187 - "start": 0,
188 - "end": 6
189 - }
190 - }
191 - ]
192 - }
193 - },
194 - {
195 - "line": {
196 - "text": "Third item",
197 - "annotations": [
198 - {
199 - "type": "bold",
200 - "range": {
201 - "start": 0,
202 - "end": 5
203 - }
204 - }
205 - ]
206 - }
207 - },
208 - {
209 - "line": {
210 - "text": "Fourth item",
211 - "annotations": [
212 - {
213 - "type": "ilink",
214 - "range": {
215 - "start": 7,
216 - "end": 12
217 - },
218 - "data": {
219 - "title": "User:JohnDoe"
220 - }
221 - }
222 - ]
223 - }
224 - }
225 - ]
226 - }
227 - ]
228 -}
\ No newline at end of file
Index: trunk/parsers/wikidom/demos/renderers/document.json
@@ -0,0 +1,227 @@
 2+{
 3+ "blocks": [
 4+ {
 5+ "type": "heading",
 6+ "level": 2,
 7+ "line": {
 8+ "text": "This is a heading",
 9+ "annotations": [
 10+ {
 11+ "type": "italic",
 12+ "range": {
 13+ "start": 10,
 14+ "end": 17
 15+ }
 16+ }
 17+ ]
 18+ }
 19+ },
 20+ {
 21+ "type": "rule"
 22+ },
 23+ {
 24+ "type": "comment",
 25+ "text": "Hello wild world of wikitext!"
 26+ },
 27+ {
 28+ "type": "table",
 29+ "attributes": {
 30+ "class": "wikitable",
 31+ "width": "50%"
 32+ },
 33+ "rows": [
 34+ [
 35+ {
 36+ "type": "heading",
 37+ "document": {
 38+ "blocks": [
 39+ {
 40+ "type": "paragraph",
 41+ "lines": [
 42+ {
 43+ "text": "This is a table heading"
 44+ }
 45+ ]
 46+ }
 47+ ]
 48+ }
 49+ }
 50+ ],
 51+ [
 52+ {
 53+ "type": "data",
 54+ "document": {
 55+ "blocks": [
 56+ {
 57+ "type": "paragraph",
 58+ "lines": [
 59+ {
 60+ "text": "This is a table cell"
 61+ }
 62+ ]
 63+ },
 64+ {
 65+ "type": "paragraph",
 66+ "lines": [
 67+ {
 68+ "text": "This is another paragraph in a table cell"
 69+ }
 70+ ]
 71+ }
 72+ ]
 73+ }
 74+ }
 75+ ]
 76+ ]
 77+ },
 78+ {
 79+ "type": "paragraph",
 80+ "lines": [
 81+ {
 82+ "text": "This is a test paragraph!",
 83+ "annotations": [
 84+ {
 85+ "type": "italic",
 86+ "range": {
 87+ "start": 0,
 88+ "end": 4
 89+ }
 90+ },
 91+ {
 92+ "type": "xlink",
 93+ "range": {
 94+ "start": 8,
 95+ "end": 22
 96+ },
 97+ "data": {
 98+ "url": "http://www.a.com"
 99+ }
 100+ },
 101+ {
 102+ "type": "bold",
 103+ "range": {
 104+ "start": 10,
 105+ "end": 14
 106+ }
 107+ }
 108+ ]
 109+ },
 110+ {
 111+ "text": "Paragraphs can have more than one line.",
 112+ "annotations": [
 113+ {
 114+ "type": "italic",
 115+ "range": {
 116+ "start": 11,
 117+ "end": 14
 118+ }
 119+ },
 120+ {
 121+ "type": "bold",
 122+ "range": {
 123+ "start": 20,
 124+ "end": 24
 125+ }
 126+ }
 127+ ]
 128+ }
 129+ ]
 130+ },
 131+ {
 132+ "type": "paragraph",
 133+ "lines": [
 134+ {
 135+ "text": "Documents can have one or more blocks.",
 136+ "annotations": [
 137+ {
 138+ "type": "bold",
 139+ "range": {
 140+ "start": 0,
 141+ "end": 9
 142+ }
 143+ }
 144+ ]
 145+ }
 146+ ]
 147+ },
 148+ {
 149+ "type": "list",
 150+ "style": "number",
 151+ "items": [
 152+ {
 153+ "line": {
 154+ "text": "First item"
 155+ },
 156+ "lists": [
 157+ {
 158+ "type": "list",
 159+ "style": "bullet",
 160+ "items": [
 161+ {
 162+ "line": {
 163+ "text": "First sub-item"
 164+ }
 165+ },
 166+ {
 167+ "line": {
 168+ "text": "Second sub-item"
 169+ }
 170+ },
 171+ {
 172+ "line": {
 173+ "text": "Third sub-item"
 174+ }
 175+ }
 176+ ]
 177+ }
 178+ ]
 179+ },
 180+ {
 181+ "line": {
 182+ "text": "Second item",
 183+ "annotations": [
 184+ {
 185+ "type": "italic",
 186+ "range": {
 187+ "start": 0,
 188+ "end": 6
 189+ }
 190+ }
 191+ ]
 192+ }
 193+ },
 194+ {
 195+ "line": {
 196+ "text": "Third item",
 197+ "annotations": [
 198+ {
 199+ "type": "bold",
 200+ "range": {
 201+ "start": 0,
 202+ "end": 5
 203+ }
 204+ }
 205+ ]
 206+ }
 207+ },
 208+ {
 209+ "line": {
 210+ "text": "Fourth item",
 211+ "annotations": [
 212+ {
 213+ "type": "ilink",
 214+ "range": {
 215+ "start": 7,
 216+ "end": 12
 217+ },
 218+ "data": {
 219+ "title": "User:JohnDoe"
 220+ }
 221+ }
 222+ ]
 223+ }
 224+ }
 225+ ]
 226+ }
 227+ ]
 228+}
\ No newline at end of file
Property changes on: trunk/parsers/wikidom/demos/renderers/document.json
___________________________________________________________________
Added: svn:eol-style
1229 + native
Added: svn:mime-type
2230 + text/plain
Index: trunk/parsers/wikidom/demos/renderers/index.html
@@ -47,7 +47,7 @@
4848 </head>
4949 <body>
5050 <p>
51 - This page use <a href="document.js">a JSON representation of wikitext</a> as input to two renderers: wikitext and HTML. The JSON source is appended at the end of the document for reference.</p>
 51+ This page use <a href="document.json">a JSON representation of wikitext</a> as input to two renderers: wikitext and HTML. The JSON source is appended at the end of the document for reference.</p>
5252 <h2>HTML Rendering</h2>
5353 <div id="html-rendering" class="render"></div>
5454 <h2>HTML Source</h2>
@@ -60,6 +60,7 @@
6161 <script src="../../lib/es/es.js"></script>
6262 <script src="../../lib/es/es.EventEmitter.js"></script>
6363 <script src="../../lib/es/es.Container.js"></script>
 64+ <script src="../../lib/es/es.DomContainer.js"></script>
6465 <script src="../../lib/es/es.AnnotationSerializer.js"></script>
6566 <script src="../../lib/es/es.Document.js"></script>
6667 <script src="../../lib/es/es.Document.Context.js"></script>
@@ -69,7 +70,7 @@
7071 <script src="../../lib/es/es.Document.JsonSerializer.js"></script>
7172 <script>
7273 $( document ).ready( function() {
73 - $.getJSON( 'document.js', function( data ) {
 74+ $.getJSON( 'document.json', function( data ) {
7475 var context = new es.Document.Context(),
7576 htmlSerializer = new es.Document.HtmlSerializer( context ),
7677 wikitextSerializer = new es.Document.WikitextSerializer( context ),

Status & tagging log