Last modified: 2014-07-31 10:21:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55568, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53568 - Automatically switch from wikitext to HTML syntax in serializer when attributes were added to elements
Automatically switch from wikitext to HTML syntax in serializer when attribut...
Status: NEW
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks: 60187
  Show dependency treegraph
 
Reported: 2013-08-29 21:51 UTC by Krinkle
Modified: 2014-07-31 10:21 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2013-08-29 21:51:18 UTC
When editing a document that contains:

* Foo
* Bar
* Baz

Adding an attribute to one of the list items in VE doesn't roundtrip (they serialise back to * instead of forcing <ul><li>..</ul>, as it will have to).

Right now VisualEditor never does this, but earlier today I was experimenting with this (the language inspector might need to do this to properly flip the directionality of an individual list item, wrapping the inner content is not an option as then the number would be on the wrong side).

When trying to reproduce this I noticed that it also happens when creating a new document (e.g. there is no existing page, it has no reason to force "*" instead of "<li>" other than that being the preferred default for wikitext).


http://parsoid.wmflabs.org/_html/:

In:
<div dir="ltr">
<ul>
<li>a
<li lang="he" dir="rtl">b
<li>c
</ul>
</div>

Out:
<div dir="ltr">

* a
* b
* c

</div>

The only case where Parsoid kept the attributes is when not editing a document with wikitext, and not creating a new document, but when editing an existing document with "<li>" in wikitext already, it did roundtrip those.
Comment 1 Gabriel Wicke 2013-08-29 23:15:47 UTC
Timo indicated on IRC that lists and list items will be first, but other elements will follow. We should try to use this first case to develop the general infrastructure.

We will need to convert an entire list to HTML syntax if an attribute is set on either the list or any list item.

Mixed templated / non-templated list items are discussed in bug 53368. We protect the entire list if any list item's bullets are template-generated. That means that we (thankfully!) won't have to consider that case here.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links