mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
83a592f312
This was broken, especially in wrappers. Changed the wrapping algorithm so that meta items are placed outside wrappers if possible. On the left-hand side, this is already the case: we don't open wrappers for meta items. On the right-hand side, this is accomplished by buffering the meta items and only inserting them when we encounter either real text (not whitespace) or the end of the wrapper. If we're interrupted by real text, we insert the meta items with the unmodified whitespace. If we're interrupted by the end of the wrapper, we insert the meta items outside of the wrapper with whitespace stripped. Internally, this is done by stripping the whitespace into the whitespace[0] of the meta item to its right. Then when we output the meta items, we either decide to 'restore' the whitespace, or to 'fixup' by also setting whitespace[3] on the element before the whitespace. Change-Id: Ibeea2a9906c4aae9fe6d284613edd6ec853ca5e7 |
||
---|---|---|
.docs | ||
demos | ||
maintenance | ||
modules | ||
.gitignore | ||
.gitreview | ||
.jshintignore | ||
.jshintrc | ||
ApiVisualEditor.php | ||
AUTHORS.txt | ||
CODING.md | ||
LICENSE.txt | ||
README.txt | ||
VisualEditor.hooks.php | ||
VisualEditor.i18n.php | ||
VisualEditor.php | ||
VisualEditorMessagesModule.php |
VisualEditor provides a visual editor for wiki pages. It is written in JavaScript and runs in a web browser. It uses the Parsoid parser to convert wikitext documents to annotated HTML which the VisualEditor is able to load, modify and emit back to Parsoid at which point it is converted back into wikitext. For more information about these projects, check out the wiki: * http://www.mediawiki.org/wiki/VisualEditor * http://www.mediawiki.org/wiki/Parsoid