Commit 8aa1509
authored
fix(converter): preserve explicit w:bidiVisual w:val="0" on export (SD-3142) (#3284)
bidiVisual-translator.decode used a one-off pattern that dropped
rightToLeft: false on export. Switch to the shared
createSingleBooleanPropertyHandler used by w:bidi (paragraph), which
distinguishes missing (omit) from explicit false (emit w:val="0").
Per ECMA-376 section 17.4.1 + 17.17.4, w:bidiVisual w:val="0" is an
explicit-false that can override a style-cascade true. Dropping it on
export silently flips the table visual direction on the next open when
the referenced table style sets bidiVisual true.
Tests:
- rightToLeft: true -> bare w:bidiVisual element
- rightToLeft: false -> w:bidiVisual w:val="0" (new — round-trip preservation)
- missing -> omit the element
- existing encode coverage retained.1 parent c6fbcf8 commit 8aa1509
2 files changed
Lines changed: 18 additions & 10 deletions
File tree
- packages/super-editor/src/editors/v1/core/super-converter/v3/handlers/w/bidiVisual
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 15 | + | |
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
0 commit comments