https://bugzilla.wikimedia.org/show_bug.cgi?id=2700
Nikola Kovacs <nx.devn...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nx.devn...@gmail.com --- Comment #75 from Nikola Kovacs <nx.devn...@gmail.com> 2012-04-20 07:59:01 UTC --- (In reply to comment #67) > (In reply to comment #65) > > > An extension can register a callback and then do pre-save transformation on > > its > > content - this is the best solution in my opinion, since only the extension > > knows which parts of the content are supposed to be transformed, e.g. in the > > case of the gallery tag only the description part. > > I am not too enthusiastic about encouraging extensions to do their own > arbitrary pre-save transform processing. In the longer run, general support > for > extensions working with parsed (and pre-save transformed) wikitext / HTML DOM > input could be cleaner and should offer better opportunities for integration > with a visual editor. I am working on something like that in the Parsoid > parser > (http://mediawiki.org/wiki/Parsoid). There is also a simple and undocumented > method for something vaguely like this in the PHP parser (the > setTransparentTagHook method). > > However, I do not have a good solution for partly-parsed and -transformed > extensions like gallery. Will give this some thought, and ask others about > their ideas. If the problem is that extensions could do arbitrary processing instead of the standard PST, then the only solution I can think of is to allow extension to somehow specify which part of their input should be transformed, and then let the parser do the processing. Implementing that would probably be much harder and more cumbersome. The only thing that needs to be done on my patch is that I'm not sure the extension calling parser->preSaveTransform is 100% safe. I can give it a go if you want, but I don't want to waste my time if the patch will be rejected because my approach (letting the extension do the PST) is not the correct one. New parsers are nice and all, but they do not fix the problem that we have right now, and they probably never will if you want to keep the current gallery syntax. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l