On 03/05/11 04:54, Alex wrote:
> Question: why does it have to normalise at all?
> 
> I do think that the editing environment at Wikipedia means that consistent
> non-normalised editing by wikitext users and subsequent normalisation by
> anyone using WYSIWYG would be messy and disruptive, but would a change
> whereby it more precisely records the wikitext, and then doesn't try and
> change it unless that part of the document is edited, be feasible?

That's basically what it does already. There's no normalisation as
such. For instance if you type <b>x</b> into the source view, you get

<b data-rte-washtml="1">x</b>

But if you type '''x''', you just get

<b>x</b>

If you type [[x|x]], you get an anchor tag with a data-rte-meta
attribute containing:

{"type":"internal","text":"x","link":"x","wasblank":false,"noforce":true,"wikitext":"[[x|x]]"}

Whereas if you type [[x]], the data-rte-meta attribute is:

{"type":"internal","text":"x","link":"x","wasblank":true,"noforce":true,"wikitext":"[[x]]"}

These attributes are sent to the server, and in principle, the
wikitext could be reconstructed precisely. There is a bug in the
particular case of [[x|x]], it gets translated to [[x]] at some point,
but lots of other cases work correctly.

If [[x|x]] is the only reason we're not using the WYSIWYG editor,
let's just fix it. It's an isolated case, not an architectural issue.

-- Tim Starling


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to