HomePhabricator

P-wrapper: Generalize removal of useless p-wrappers

Authored by ssastry on Sep 30 2017, 4:22 AM.

Description

P-wrapper: Generalize removal of useless p-wrappers

  • This was being applied only to formatting tags. Plus, this was hardcoded to only look at a 1-tag run.
  • This patch generalizes removal to a run of tags that have unnecessary p-wrapping.

    Fun edge case: This removes p-wrapping around empty tags. Tidy removes those anyway and Parsoid uses CSS to suppress them. But, there is no clear argument for what is the right output. For now, code simplicity dictates we go with current behaviour.
  • Added a new parser test.

Bug: T177115
Change-Id: I591fda8e8e484f4f584a3f97eaefb11e54ec2a4d

Details

Committed
ssastryOct 3 2017, 6:38 PM
Parents
rGPARfb78291c46ee: Add a list of HTML4 Inline tags
Branches
Unknown
Tags
Unknown
References
refs/changes/18/381518/9
ChangeId
I591fda8e8e484f4f584a3f97eaefb11e54ec2a4d