mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
d7e83c4e2b
- More pieces are now simplified and all(?) newline handling is now centralized in the serializeToken function. - This commit fixes bugs in rt-ing some code snippets ---------- Ex 1: foo<p>bar</p>baz ---------- - This commit fixes bugs serializing VE generated html ---------- Ex 2: <p>foo</p><pre>bar</pre> ==> foo\n bar ---------- - But, this round of fixes introduces RT failures for certain code examples in parserTests.txt. In all these failing cases, inline text/html is embedded within a generated <p> tag during parsing. If these generated <p> tags can have a "gc:1" attribute added to them, we can properly serialize them to the original form. ---------- Ex 3: foo<pre>bar</pre> Parsed HTML: <p>foo</p><pre>bar</pre> ---------- Note how this parsed HTML is identical to what the VE outputs in Example 2 above. So, without the gc:1 attribute, we now have conflicting requirements on the example same HTML. This increases confidence in the correctness of my commit here. Change-Id: I86beadec91c445a7f8a6d36a639b406697daa0a2 |
||
---|---|---|
.. | ||
html5 | ||
core-upgrade.js | ||
ext.Cite.js | ||
ext.cite.taghook.ref.js | ||
ext.core.AttributeExpander.js | ||
ext.core.BehaviorSwitchHandler.js | ||
ext.core.LinkHandler.js | ||
ext.core.ListHandler.js | ||
ext.core.NoIncludeOnly.js | ||
ext.core.ParserFunctions.js | ||
ext.core.PostExpandParagraphHandler.js | ||
ext.core.QuoteTransformer.js | ||
ext.core.Sanitizer.js | ||
ext.core.TemplateHandler.js | ||
ext.Util.js | ||
ext.util.TokenCollector.js | ||
mediawiki.ApiRequest.js | ||
mediawiki.DOMConverter.js | ||
mediawiki.DOMPostProcessor.js | ||
mediawiki.HTML5TreeBuilder.node.js | ||
mediawiki.LinearModelConverter.js | ||
mediawiki.parser.defines.js | ||
mediawiki.parser.environment.js | ||
mediawiki.parser.js | ||
mediawiki.Title.js | ||
mediawiki.tokenizer.peg.js | ||
mediawiki.TokenTransformManager.js | ||
mediawiki.WikitextSerializer.js | ||
package.json | ||
parse.js | ||
pegTokenizer.pegjs.txt | ||
README.txt |
A combined Mediawiki and html parser in JavaScript running on node.js. Please see (https://www.mediawiki.org/wiki/Future/Parser_development) for an overview of the current implementation, and instructions on running the tests. You might need to set the NODE_PATH environment variable, export NODE_PATH="node_modules" Download the dependencies: npm install Run tests: npm test