Index: trunk/extensions/VisualEditor/modules/parser/mediawiki.parser.js |
— | — | @@ -30,10 +30,10 @@ |
31 | 31 | this.wikiTokenizer = new PegTokenizer(); |
32 | 32 | |
33 | 33 | /** |
34 | | - * Token stream transformations. |
35 | | - * This is where all the wiki functionality is implemented. |
36 | | - * See https://www.mediawiki.org/wiki/Future/Parser_development/Token_stream_transformations |
37 | | - */ |
| 34 | + * Token stream transformations. |
| 35 | + * This is where all the wiki-specific functionality is implemented. |
| 36 | + * See https://www.mediawiki.org/wiki/Future/Parser_development/Token_stream_transformations |
| 37 | + */ |
38 | 38 | this.tokenTransformer = new TokenTransformDispatcher (); |
39 | 39 | |
40 | 40 | // Add token transformations.. |
— | — | @@ -46,15 +46,15 @@ |
47 | 47 | this.tokenTransformer.listenForTokensFrom( this.wikiTokenizer ); |
48 | 48 | |
49 | 49 | /** |
50 | | - * The tree builder creates a DOM tree from the token soup emitted from |
51 | | - * the TokenTransformDispatcher. |
52 | | - */ |
| 50 | + * The tree builder creates a DOM tree from the token soup emitted from |
| 51 | + * the TokenTransformDispatcher. |
| 52 | + */ |
53 | 53 | this.treeBuilder = new FauxHTML5.TreeBuilder(); |
54 | 54 | this.treeBuilder.listenForTokensFrom( this.tokenTransformer ); |
55 | 55 | |
56 | 56 | /** |
57 | | - * Final processing on the HTML DOM. |
58 | | - */ |
| 57 | + * Final processing on the HTML DOM. |
| 58 | + */ |
59 | 59 | |
60 | 60 | // Generic DOM transformer. |
61 | 61 | // This currently performs minor tree-dependent clean up like wrapping |
— | — | @@ -65,13 +65,13 @@ |
66 | 66 | |
67 | 67 | |
68 | 68 | /** |
69 | | - * Conversion from HTML DOM to WikiDOM. This is not needed if plain HTML |
70 | | - * DOM output is needed, so it should only be registered to the |
71 | | - * DOMPostProcessor 'document' event if WikiDom output is requested. We |
72 | | - * could emit events for 'dom', 'wikidom', 'html' and so on, but only |
73 | | - * actually set up the needed pipeline stages if a listener is registered. |
74 | | - * Overriding the addListener method should make this possible. |
75 | | - */ |
| 69 | + * Conversion from HTML DOM to WikiDOM. This is not needed if plain HTML |
| 70 | + * DOM output is needed, so it should only be registered to the |
| 71 | + * DOMPostProcessor 'document' event if WikiDom output is requested. We |
| 72 | + * could emit events for 'dom', 'wikidom', 'html' and so on, but only |
| 73 | + * actually set up the needed pipeline stages if a listener is registered. |
| 74 | + * Overriding the addListener method should make this possible. |
| 75 | + */ |
76 | 76 | this.DOMConverter = new DOMConverter(); |
77 | 77 | |
78 | 78 | |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | // and convert parser tests etc to listen on it! See comments above for ideas. |
91 | 91 | ParserPipeline.prototype.setDocumentProperty = function ( document ) { |
92 | 92 | this.document = document; |
93 | | -} |
| 93 | +}; |
94 | 94 | |
95 | 95 | |
96 | 96 | // XXX: remove JSON serialization here, that should only be performed when |