Very impressive. But I've seen no handling of template/preprocessor syntax? I thought I had seen beginnings in that field around those Future/Parser pages in the wiki, but does it work?
The current tokenizer handles template syntax well, but template expansion is work in progress. Doing the expansion on the token stream should allow us to render unbalanced templates like the table start / row / table end combinations.
Representing these unbalanced templates in an expanded state in the editor is difficult though, so I guess the most likely solution is to wrap these templates into an opaque object editable with a specialized widget.
For over a year I have ideas how to build a Javascript live preprocessor, but since I've studied the preprocessor code and written a static js preprocessor I had no time to start it off. So now I'd really love to help with that.
We try to do without a textual preprocessor, and instead move most preprocessor tasks to transformations on a token stream produced by a grammar-based tokenizer [1]. Template expansion is already implemented for a tree structure, but needs to be ported to handle tokens. Many other parser tasks are listed in the todo section of [1].
I am currently working on a conversion of HTML DOM to WikiDom, with template expansion planned next. Feel free to dive into the code and tackle any of the tasks on the list ;)
Gabriel
[1]: https://www.mediawiki.org/wiki/Future/Parser_development