mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
1c80e2d7f0
* This routine attempts to rewrite the DOM to maximize tag overlap and thus minimize tag uses. * This takes as input a set of tags which participate in the minimization. * Tested on the following example <b><i><u><s>BIUS</s></u></i></b><b><i><s>BIS</s></i></b><b><u><s>BUS</s></u></b><u><i>UI</i></u> with multiple combinations of the 2^4 possible variations of i,b,u,s tags: [], ['i','b','u','s'], ['i'], ['b','s'], ['i','b','u'] - But, I am not fully sure if this implements the right behavior when only a subset of inline tags are provided. Needs discussion and tweaking as necessary. * Also tested on few others: <b>B</b><b><i>BI</i></b><b><i><u>BIU</u></i></b><b><i><u><s>BIUS</s></u></i></b> <s><i><b>SIB</s></i></b><s><i><u>SIU</u></i></s><i><u>IU</u></i><i>I</i> * The previous pairwise tag rewriting version fails on several of these examples, so this new version is a definite improvement. * No change in parserTests run (203 passing before and after). * Possible improvements that could/should be undertaken: - get rid of useless/idempotent add/remove of nodes that don't change the DOM. - ensure that node attributes post-restructuring are correct. Change-Id: Ib4a8b39583fa96a2be880a77021ca81cefa06484 |
||
---|---|---|
api | ||
contentEditable | ||
demos | ||
modules | ||
tests | ||
.gitignore | ||
.gitreview | ||
README | ||
SpecialVisualEditorSandbox.php | ||
VisualEditor.alias.php | ||
VisualEditor.i18n.php | ||
VisualEditor.php |
We're starting to merge bits from Wikidom and ParserPlayground tests here. Enjoy! Short-term work highlights: * convert parser to wikidom format & using the wikidom serializer * port/update/write more tests * Special: page to host the editor as a standalone demo * Opt-in test mode to switch the editor in on EditPage (initially blank) * Use serializer to save pages from editor * Use parser to load pages into editor Long-term work highlights: * more thorough & bulk testing * more extension support