sphinx-contrib / confluencebuilder

Confluence Markup Builder Plugin for Sphinx
BSD 2-Clause "Simplified" License
315 stars 99 forks source link

Improve reference tracking #1016

Closed jdknight closed 2 months ago

jdknight commented 2 months ago

This performs another rework of tracking targets for references in this extension. It is another attempt to improve the state of building proper links no matter what builder type is selected. This update was primarily driven some limitations observed when using the singleconfluence builder. In some scenarios, links to headers would not point to proper anchor points in both editor versions. In addition, special anchor processing in v2 only worked for a subset of links.

We moved all target registration into the main builder and added conditions for when using different builder types. This has helped remove some duplication related to building anchors. Corrections towards tracking duplicate headers addressed some broken links observed in a singleconfluence mode. In addition, this also corrects scenarios where this extension incorrectly applies duplicate header index postfixing for headers which have multiple reference identifiers.

Cannot say reference management is perfect. There are still some scenarios where nodes have identifiers where this extension may not generate an anchor or attempt to find a Confluence-generated identifier link (e.g. terms), but these can be improved on over time and as more test scenarios are created.