![]() | This proposal is part of "A Dozen Visions for Wikitext". Shortcuts: Versioning - Grunge - Markdown - HTML-only wikis - Extension tag fragments - Syntax uniformity - Colon replacement - Backticks - Syntax for Discussions - #media - #lang - #balance - Long arguments - Variable-length/structured arguments - Annotations - Visual Templates - Page Description Language - Native Script Editing - One Wiki |
So let’s say I can set a page as “wikitext 2.0” instead of “wikitext 1.0”. What would wikitext 2.0 look like?
One of the difficulties of current wikitext is the lack of a written spec, and the complexity of its implementation.
Grunge is an attempt to radically simplify wikitext, to something you could describe “on a single sheet of paper”, and which eliminates the excessive look-ahead and backtracking in the current parser. It was designed to map to and from HTML, just like Parsoid does with “wikitext 1.0”, so that you can in fact use MediaWiki DOM Spec HTML as an intermediate representation to convert between wikitext 1.0 and Grunge. An article stored as wikitext 1.0 can be edited as Grunge by converting first to HTML and then into Grunge, and vice versa. (This is a useful property for any "wikitext 2.0" proposal, not just Grunge.)
Here’s what it would look like. I tried to make this “look like wikitext”, while also squashing ambiguities in wikitext 1.0. For example, in current wikitext you can put 5 single-quotes in a row and create something which could resolve into either bold or italics or quotes. In Grunge most constructs start and end with curly braces to eliminate the ambiguities. We also add block headings and block list items, which are missing from wikitext 1.0. We’ve made some changes to magic words and extension tag syntax, which we’ll return to later.
This ends up looking very much like wikitext. Here’s an example of editing a page with Grunge:
This is boring, because Grunge is exactly the same as wikitext 1.0 in this simple example. But that’s kind of the point.
Next section: Markdown