On Mon, May 2, 2011 at 9:17 AM, Daniel Friesen <lists(a)nadir-seen-fire.com>wrote;wrote:
On 11-05-02 08:12 AM, Thomas Dalton wrote:
No. I clearly said there would be small amounts
of normalisation to
deal with new wikitext edits, but that the whole article would only
need to be normalised once. I was not assuming we would do away with
wikitext editing entirely (and wouldn't support doing so).
He might be
alluding to the fact that even after you normalize it,
someone not using WYSIWYG can go and make an edit that happens to use
pre-normalized stuff, and as a result that gets messed up the next time
someone edits using a WYSIWYG editor.
In a sane world, you might actually end up with the same normalization
regardless of what method you used to edit; we do after all perform
post-save transforms using the parser, which turns ~~~ into a signature,
[[Foo (bar)|]] into [[Foo (bar)|Foo]] etc.
It would not be unreasonable for a human- or bot-made source edit to get run
through the parser for normalization on save, leaving you with only "real"
diffs going forward.
I think that "little" markup normalization like this will eventually not be
too big a deal; either the system will start applying the normalization
consistently, or it won't have to because all the information available to
reconstruct the original source is round-tripped through the wysiwig side.
A bigger deal will probably be actually changing structures that don't
render consistently, and that'll depend on how brave we are changing nested
template & table structures to fit a hierarchical document model.
We've basically got two levels of stuff:
* parsing wiki markup into a document structure that's useful for editing
* using the document structure to render HTML output or an editing
environment
Our classic MediaWiki parser does only a tiny bit of the first in the
preprocessor, and then leaves a lot more of our markup to the transformation
layer, which is how we end up with things like templates that expand into an
HTML tag opener, of which which some adjacent templates contain the contents
and endings.
If we can devise a way to consistently treat expansions that *aren't* a
hierarchical match fro the HTML node tree, then we might not have to change
templates much. If we can't, then we might have to start enforcing
hierarchical template & other code nesting and go through and migrate a
bunch of existing templates.
-- brion