mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
e584e35ecb
Basically only prefix all bullets if the serialization output is going to be in start-of-line context. The test for that is currently inline, but should perhaps be factored out to a method or state flag instead. We could alternatively consider to return the start-of-line prefix and let it be used in _serializeToken in case we end up in start-of-line context. This patch also fixes a newline issue on input like this: :d1 ::: d3 Both the list and list item handlers now set the startsNewline flag dynamically depending on the context, so that we don't depend on the suppression of newlines from list syntax by the singleLineMode any more. There is still an extra newline inserted between list items in the following example: ;t1 :d1 ;;t2 ::d2 This looks like a bug in the produced DOM and not in the serializer, since the outer definition list is closed and re-opened between d1 and t2. Change-Id: I78e3a1ef34cf9159d5a1e86fb64c774ff111e71d |
||
---|---|---|
api | ||
demos | ||
modules | ||
tests | ||
.gitignore | ||
.gitreview | ||
ApiVisualEditor.php | ||
README | ||
SpecialVisualEditorSandbox.php | ||
VisualEditor.alias.php | ||
VisualEditor.hooks.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