Hello everyone,
I have proposed a 2017 Dev Summit session titled "Improved editability, tooling, reasoning, and performance by adopting DOM-based semantics for wikitext" [1].
The TL:DR; summary is to treat a wikitext article as made up of document fragments that are composed together instead of a concatenation of strings which may (but often does not) yield well-formed HTML markup.
Rather than repeat what is already there on the task, I'll mention a couple of benefits if you are an editor:
1. If you are a template editor, and you edit a template, it would be much more efficient to update all affected articles. For the common use case, you would simply replace the old output in an article with the new output without having to reparse the article.
2. It is possible to think of edit tooling that lets you edit the document at much finer granularities than sections without stepping on each other's toes.
There are more details in a draft note [2]. Please don't be alarmed by the "wikitext 2.0" term there. That is an umbrella term that we've been throwing around in the Parsing Team for a bunch of related but different proposals related to wikitext syntax and semantics. This phab task and the wiki page is one proposal that concerns itself primarily with semantics of wikitext markup and less about syntax. The only syntactic feature considered is the heredoc-style syntax for some transclusions [3] which would immensely benefit this approach.
Please comment on the task with your thoughts, ideas, concerns, approval, criticism, or award tokens or subscribe to indicate interest. :-)
Thanks,
Subbu.
[1] https://phabricator.wikimedia.org/T149282
[2] https://www.mediawiki.org/wiki/Parsing/Notes/Wikitext_2.0
wikitech-l@lists.wikimedia.org