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

       Web browser: ---
            Bug ID: 49766
           Summary: Parsoid should join adjacent <b> tags and the like
           Product: Parsoid
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: JS/General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

$ echo "'''Foo'''Bar'''Baz'''" | node parse.js --wt2html | tee foobarbaz
<body><p data-parsoid='{"dsr":[0,21,0,0]}'><b
data-parsoid='{"dsr":[0,9,3,3]}'>Foo</b>Bar<b
data-parsoid='{"dsr":[12,21,3,3]}'>Baz</b></p>
</body>

# Edit text to remove Bar, round-trip back
$ cat foobarbaz
<body><p data-parsoid='{"dsr":[0,21,0,0]}'><b
data-parsoid='{"dsr":[0,9,3,3]}'>Foo</b><b
data-parsoid='{"dsr":[12,21,3,3]}'>Baz</b></p>
</body>

$ cat foobarbaz | node parse.js --html2wt
'''Foo''''''Baz'''


The expected output is '''FooBaz'''.

Right now this works correctly because VE joins the adjacent <b> tags and sends
Parsoid <b data-parsoid='{"dsr":[0,9,3,3]}'>FooBaz</b>, but this is incorrect
because the attributes on the second <b> are dropped. Dropping those attributes
leads to round-trip errors when those attributes are meaningful.
https://gerrit.wikimedia.org/r/67493 addresses this in VE, but merging it would
cause this to break.

-- 
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