https://bugzilla.wikimedia.org/show_bug.cgi?id=39545

       Web browser: ---
             Bug #: 39545
           Summary: Comments break splitting of paragraphs
           Product: Parsoid
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


See http://parsoid.wmflabs.org/_rt/mw/VisualEditor:Test , and note how "many of
your questions" and "Note: The Edit button" are on the same line, while they're
really supposed to be in separate paragraphs.

Basically, what's going on here is that the wikitext:

Foo
<!-- Comment -->

Bar

is turned into this HTML:
<p>Foo
<!-- Comment -->

Bar</p>

while really the correct output is this:
<p>Foo</p>
<!-- Comment -->

<p>Bar</p>

This results in the page rendering as "Foo Bar" rather than "Foo [paragraph
break] Bar", and of course that means the way the editor renders it and lets
you edit it is wrong as well.

What's maybe even scarier is that this round-trips "correctly", i.e. the
wikitext->HTML conversion is wrong, but then the HTML->wikitext conversion is
wrong in exactly the reverse way, and that causes it to round-trip. I suspect
this is because of the presence of the newlines in the HTML, but that's also a
bug: ideally the serializer shouldn't convert a single <p> to wikitext
representing multiple paragraphs, regardless of newlines (this is very unlikely
to be a practical problem for VE though).

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to