Commit ca031fa
committed
translator: register section anchors for all editors
To help ensure anchor links to section work across all editor types and
on all Confluence variants, ensure we always inject section anchors.
Historically, this extension would only create anchors if required.
Sections should have their own identifiers pre-made by Confluence.
However, the identifiers are not consistent between different variations
of Confluence and certain features (e.g. ac:links to anchors) expect
certain anchor names. Over time we duplicated some anchors to help make
things smooth when the new Confluence editor was made. Unfortunately,
recent testing still showed not all links would function as expected.
This commit tries to cover all anchor cases by always forcefully
creating anchors in sections (and compatibility anchors), no matter
what the editor is. When testing on Confluence Data Center, references
appeared to work as they always have. With Confluence Cloud, references
appear to function across different editors with when checking
reference tests and inspecting `contents` usage.
Signed-off-by: James Knight <git@jdknight.me>1 parent 3ed6176 commit ca031fa
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
277 | | - | |
| 276 | + | |
| 277 | + | |
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
| 285 | + | |
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
290 | | - | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| |||
3497 | 3498 | | |
3498 | 3499 | | |
3499 | 3500 | | |
3500 | | - | |
| 3501 | + | |
3501 | 3502 | | |
3502 | 3503 | | |
3503 | 3504 | | |
| |||
3514 | 3515 | | |
3515 | 3516 | | |
3516 | 3517 | | |
| 3518 | + | |
3517 | 3519 | | |
3518 | 3520 | | |
3519 | 3521 | | |
3520 | 3522 | | |
3521 | 3523 | | |
3522 | 3524 | | |
3523 | 3525 | | |
3524 | | - | |
| 3526 | + | |
3525 | 3527 | | |
3526 | 3528 | | |
3527 | 3529 | | |
| |||
0 commit comments