Page MenuHomePhabricator

Unclosed comment get closed in round-trip
Closed, DeclinedPublic

Description

Feed <!-- to it.


Version: unspecified
Severity: minor

Details

Reference
bz41230

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:03 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz41230.

We recently added support for round-tripping of autoclosed tags (just <b> for example), but this relies on internal round-trip data on the element. Comments do not support rt data, so we'd have to wrap the comment in special elements (a span for example), which would be quite ugly.

We are working on selective serialization (only serialize modified parts of the document) to avoid dirty diffs from this kind of issue. This should also prevent auto-closed comments from showing up in diffs unless the last paragraph is edited.

I actually doubt that there is a good use case for supporting this. Afaik the main case where this can happen in practice is when an unclosed comment is at the end of the input. In that case closing the comment introduces a small diff, but is otherwise harmless.

Closing this as wontfix, please reopen if you see a good reason for working on this.