Commit 6da1954
Collapse nested markup with surrounding text; leave nested <sup> alone (BL-16387)
Responds to review feedback on PR #8019: the collapse regex previously only
removed markup doubled exactly at the boundary (<b><b>...</b></b>). It now also
collapses cases with text inside the outer element but outside the inner one,
e.g. <b>abc<b>def</b>ghi</b> -> <b>abcdefghi</b>, since the inner tag adds no
formatting and can cause surprises when toggling the style.
Also drop <sup> from the collapse set: nested superscript is semantically
meaningful, so those are left as-is (attributes are still stripped from the
inner tag).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4ffb167 commit 6da1954
2 files changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2698 | 2698 | | |
2699 | 2699 | | |
2700 | 2700 | | |
2701 | | - | |
2702 | | - | |
| 2701 | + | |
| 2702 | + | |
2703 | 2703 | | |
2704 | 2704 | | |
2705 | 2705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3183 | 3183 | | |
3184 | 3184 | | |
3185 | 3185 | | |
3186 | | - | |
| 3186 | + | |
3187 | 3187 | | |
3188 | 3188 | | |
3189 | 3189 | | |
3190 | 3190 | | |
3191 | | - | |
| 3191 | + | |
3192 | 3192 | | |
3193 | 3193 | | |
3194 | 3194 | | |
| |||
3199 | 3199 | | |
3200 | 3200 | | |
3201 | 3201 | | |
3202 | | - | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + | |
3203 | 3207 | | |
3204 | 3208 | | |
3205 | 3209 | | |
| |||
0 commit comments