mediawiki-extensions-Visual.../modules/parser
Adam Wight a85ed36efa "magic words" are tokenized and used to set parser.environment flags
behavior switches are converted to tokens which set parser.environment flags during the async transformation stage.

The next step would be for handlers in the sync23 stage to generate the TOC, section edit links, and so on according to these directives.

No tests written, because the switches are consumed and don't appear in rendered html.  We can test the magic word layout controls individually, once they're implemented.

Another small change was to store option flags directly in the environment object, not that it makes much difference.

Change-Id: I863fbf4be1a17d2f6c31158298dd301f19ae1137
2012-04-04 11:25:29 -07:00
..
html5 Land big TokenTransformDispatcher and eventization refactoring. 2012-01-03 18:44:31 +00:00
ext.Cite.js Token representation clean-up. Now all tokens are differentiated using 2012-03-07 20:06:54 +00:00
ext.cite.taghook.ref.js Moving parser stuff back into the modules folder (oops) 2011-11-02 21:45:57 +00:00
ext.core.AttributeExpander.js Improve generic attribute expansion before external link processing, and make 2012-03-06 18:02:35 +00:00
ext.core.BehaviorSwitchHandler.js "magic words" are tokenized and used to set parser.environment flags 2012-04-04 11:25:29 -07:00
ext.core.LinkHandler.js Move link types to data-mw-rt, and support some more template tokenization 2012-03-13 12:32:31 +00:00
ext.core.NoIncludeOnly.js Token representation clean-up. Now all tokens are differentiated using 2012-03-07 20:06:54 +00:00
ext.core.ParserFunctions.js Don't eat newline / space in template parameters 2012-04-04 11:22:31 +02:00
ext.core.PostExpandParagraphHandler.js Don't eat newline / space in template parameters 2012-04-04 11:22:31 +02:00
ext.core.QuoteTransformer.js Replace console.log with console.warn in all debug statements 2012-02-14 20:56:14 +00:00
ext.core.Sanitizer.js Shorten data-mw-rt to data-mw and clean up whitelist 2012-04-02 18:12:49 +02:00
ext.core.TemplateHandler.js Convert syntactical break flags for templates from counters to the stack 2012-03-14 16:30:59 +00:00
ext.Util.js A few improvements to external link and image handling. 264 tests passing. 2012-03-05 15:34:27 +00:00
ext.util.TokenCollector.js Token representation clean-up. Now all tokens are differentiated using 2012-03-07 20:06:54 +00:00
mediawiki.DOMConverter.js Replace console.log with console.warn in all debug statements 2012-02-14 20:56:14 +00:00
mediawiki.DOMPostProcessor.js Replace console.log with console.warn in all debug statements 2012-02-14 20:56:14 +00:00
mediawiki.HTML5TreeBuilder.node.js Shorten data-mw-rt to data-mw and clean up whitelist 2012-04-02 18:12:49 +02:00
mediawiki.LinearModelConverter.js Add HTML DOM -> linear model converter 2012-03-29 12:47:14 -07:00
mediawiki.parser.defines.js Move link types to data-mw-rt, and support some more template tokenization 2012-03-13 12:32:31 +00:00
mediawiki.parser.environment.js "magic words" are tokenized and used to set parser.environment flags 2012-04-04 11:25:29 -07:00
mediawiki.parser.js "magic words" are tokenized and used to set parser.environment flags 2012-04-04 11:25:29 -07:00
mediawiki.Title.js Improve generic attribute expansion before external link processing, and make 2012-03-06 18:02:35 +00:00
mediawiki.tokenizer.peg.js Enable support for block-level wiki constructs in template arguments. This 2012-03-15 11:43:49 +00:00
mediawiki.TokenTransformManager.js Fix some usages of splice.apply in the data model to use 2012-03-10 00:31:28 +00:00
parse.js Add HTML DOM -> linear model converter 2012-03-29 12:47:14 -07:00
pegTokenizer.pegjs.txt "magic words" are tokenized and used to set parser.environment flags 2012-04-04 11:25:29 -07:00
README.txt Hack up some rudimentary image rendering. Using jshashes for the md5, and 2012-03-01 13:51:53 +00:00

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.

npm dependencies: (This should be a proper package.json for npm to do it automatically?)

jquery
jsdom
buffer
optimist
pegjs
querystring
html5
jshashes
request (also required and automatically installed by jsdom)
assert

The following additional modules are used in parserTests:

colors (for parserTests eye candy)
diff (parserTests output diffing)