mediawiki-extensions-Visual.../modules/parser
Gabriel Wicke e2ca8c24c7 Delay some token duplication until actual mutation happens
This is a bit better than cloning tokens wholesale, but not by much. There is
a lot of potential for much better per-token caching with reduced token
cloning. Need to map out all dependencies besides token attributes expanded
from template parameters or other scoped state. Even if tokens themselves
don't need transformation, they might still need to be considered for other
token transformers, so simply keeping the final rank won't quite work even if
the token itself is fully transformed. As a minimum, a shallow clone would
need to be made and the rank reset (as in env.cloneTokens).

Change-Id: I4329113bb21750bae9a635229ed1b08da75dc614
2012-04-18 17:53:04 +02:00
..
html5
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
ext.core.AttributeExpander.js Delay some token duplication until actual mutation happens 2012-04-18 17:53:04 +02: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 More tweaks: safesubst and image options 2012-04-17 11:02:52 +02:00
ext.core.NoIncludeOnly.js Collected tweaks 2012-04-16 15:47:03 +02:00
ext.core.ParserFunctions.js Implement urlencode parser function 2012-04-16 14:54:03 +02:00
ext.core.PostExpandParagraphHandler.js Match the empty string as whitespace too 2012-04-16 14:48:39 +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 Delay some token duplication until actual mutation happens 2012-04-18 17:53:04 +02:00
ext.core.TemplateHandler.js Delay some token duplication until actual mutation happens 2012-04-18 17:53:04 +02:00
ext.Util.js Nominate more HTML5 sectioning and heading elements for block-level treatment 2012-04-11 12:53:49 +02:00
ext.util.TokenCollector.js Token stream transform improvements 2012-04-12 15:42:09 +02: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 Collected tweaks 2012-04-16 15:47:03 +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 Add tokenizer cache and clone token state on mutation 2012-04-18 14:40:47 +02:00
mediawiki.parser.js Add tokenizer cache and clone token state on mutation 2012-04-18 14:40:47 +02:00
mediawiki.Title.js Add basic thumb rendering support 2012-04-09 23:04:26 +02:00
mediawiki.tokenizer.peg.js Delay some token duplication until actual mutation happens 2012-04-18 17:53:04 +02:00
mediawiki.TokenTransformManager.js Delay some token duplication until actual mutation happens 2012-04-18 17:53:04 +02:00
package.json Add tokenizer cache and clone token state on mutation 2012-04-18 14:40:47 +02:00
parse.js Fixes to template expansion / token transform managers, 296 tests passing. 2012-04-11 16:34:27 +02:00
pegTokenizer.pegjs.txt Collected tweaks 2012-04-16 15:47:03 +02:00
README.txt As much as I have loved writing Makefiles... I've replaced its functionality with package.json, mostly so we can avoid non-node dependencies. This is one of the recommended practices. We should consider moving tests/parser into modules/parser/tests, other node projects keep all module code in one directory. 2012-04-04 11:02:58 -07: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.

You might need to set the NODE_PATH environment variable,
  export NODE_PATH="node_modules"

Download the dependencies:
  npm install

Run tests:
  npm test