r111249 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111248‎ | r111249 | r111250 >
Date:17:59, 11 February 2012
Author:gwicke
Status:deferred
Tags:
Comment:
Remove WikiDom default serialization and --html argument from parse.js
wrapper. HTML ist now the only supported format. The DOMConverter is now no
longer used. Roan, feel free to remove / butcher it for direct HTML to linear
model conversion.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/parser/parse.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/parser/parse.js
@@ -13,11 +13,6 @@
1414
1515 ( function() {
1616 var argv = optimist.usage( 'Usage: $0', {
17 - 'html': {
18 - description: 'Produce html output instead of WikiDom',
19 - 'boolean': true,
20 - 'default': false
21 - },
2217 'debug': {
2318 description: 'Debug mode',
2419 'boolean': true,
@@ -75,15 +70,8 @@
7671 process.stdin.on( 'end', function() {
7772 var input = inputChunks.join('');
7873 parser.on('document', function ( document ) {
79 - if ( ! argv.html ) {
80 - var wikiDom = new DOMConverter().HTMLtoWiki( document.body ),
81 - // Serialize the WikiDom with indentation
82 - output = JSON.stringify( wikiDom, null, 2 );
83 - process.stdout.write( output );
84 - } else {
85 - // Print out the html
86 - process.stdout.write( document.body.innerHTML );
87 - }
 74+ // Print out the html
 75+ process.stdout.write( document.body.innerHTML );
8876 // add a trailing newline for shell user's benefit
8977 process.stdout.write( "\n" );
9078 process.exit(0);

Status & tagging log