Commit de9b364
fix(reverse_sync): 순서 목록 시작 번호(ol start) 변경을 XHTML에 반영합니다 (#905)
## Description
MDX 순서 목록의 시작 번호(예: `3. first`)가 변경될 때 Confluence XHTML의
`<ol start="N">` 속성이 업데이트되지 않는 버그를 수정합니다.
**변경 전**: MDX `3. first\n4. second` → XHTML `<ol><li>...</li></ol>`
(start 속성 없음) ❌
**변경 후**: MDX `3. first\n4. second` → XHTML `<ol
start="3"><li>...</li></ol>` ✅
### 변경 파일
- `bin/reverse_sync/list_patcher.py`: `_get_ordered_list_start()` 헬퍼 추가,
`_regenerate_list_from_parent()`에서 시작 번호 변경 감지 시 `ol_start` 필드 포함
- `bin/reverse_sync/xhtml_patcher.py`: `ol_start` 패치 필드로 `<ol start>` 속성
갱신(또는 `start=1`이면 제거)
- `tests/test_reverse_sync_xhtml_patcher.py`: `TestOlStartPatch` 클래스 추가
(new_inner_xhtml 경로, 텍스트 전이 경로, start 제거 케이스)
- `tests/test_reverse_sync_list_patcher_ol_start.py`:
`_get_ordered_list_start` 단위 테스트 추가
## Added/updated tests?
- [x] Yes — `TestOlStartPatch` 3개, `TestGetOrderedListStart` 6개 추가
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4073482 commit de9b364
4 files changed
Lines changed: 109 additions & 4 deletions
File tree
- confluence-mdx
- bin/reverse_sync
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
101 | 110 | | |
102 | 111 | | |
103 | 112 | | |
| |||
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
128 | | - | |
| 137 | + | |
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
132 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
133 | 147 | | |
134 | 148 | | |
135 | 149 | | |
| |||
139 | 153 | | |
140 | 154 | | |
141 | 155 | | |
142 | | - | |
| 156 | + | |
143 | 157 | | |
144 | 158 | | |
145 | 159 | | |
146 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
147 | 166 | | |
148 | 167 | | |
149 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
440 | 441 | | |
441 | 442 | | |
442 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
0 commit comments