Yes, you have a point. The problem is that I wanted to reuse the google closure editor, which manipulates pure html.
Anyway, I've *slightly* cleaned the sources (at least it builds smoothly, with the latest version of the required tools as explained in the README), and it is online at http://github.com/williamleferrand/mediawiki-ocaml-js
If anyone is willing to investigate on my work I'll be pleased to answer all the questions that may occur! I wrote this code primarily as a "proof of concept" for the ocaml to javascript toolchain, but if it can help wikipedia it would be great.
I've included a brief roadmap in the README, but of course it is only what I have in mind right now.
Best,
William
2010/8/13 Roan Kattouw roan.kattouw@gmail.com:
2010/8/13 William Le Ferrand william@corefarm.com:
- No, I haven't check that. It is a very important issue, but if the
current result is not correct it should be a matter of fixing a few bugs here and there, not a global design issue.
There is a very fundamental issue with converting wikitext to HTML, then back, which is that there are multiple wikitext alternatives that produce the same HTML: [[Foo]] and [[Foo|Foo]] for instance. Earlier versions of FCKeditor used to 'normalize' all links looking like [[Foo]] to [[Foo|Foo]], which resulted absolutely hideous diffs that were nigh impossible to review because the actual changes got buried in lots of link 'normalizations'. This is what Trevor is talking about when he asks about the "cleanliness of your diffs".
I believe this particular bug was fixed, but the general point stands: you need to somehow remember things about the wikitext that went in in order to have a chance to get it back relatively unscathed. I personally believe that the round-trip approach is fundamentally flawed and that you should have some internal representation (not HTML) closely connected to the wikitext in which you track changes, but that's just my personal conviction and I'm not aware of any successful editors built this way.
Roan Kattouw (Catrope)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l