Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

singlebuilder: unique identifiers for merged doctree #1049

Merged
merged 5 commits into from
Oct 12, 2024

Conversation

jdknight
Copy link
Member

When merging multiple doctrees into a single one, elements may have conflicting reference identifiers. This can lead to conflicting raw anchors as well as other logic in translators to create unexpected links when running the singleconfluence builder.

This commit updates the merging process to replace the identifiers of each doctree element when a conflict is detected. Elements will be given a new identifier value, as well as elements referencing other elements will have their reference identifiers updated as well.

The following moves the compat-held `inline_all_toctrees` call into the
builder itself. The original intent was to submit an upstream change to
support inlining with toctree replacement support. This was never pushed
on, so leaving it in the compat module is no longer required.

There are additional changes planned to be made to the inlining process,
to moving it now will ready the implementation for these prospect
changes.

Signed-off-by: James Knight <[email protected]>
When merging multiple doctrees into a single one, elements may have
conflicting reference identifiers. This can lead to conflicting raw
anchors as well as other logic in translators to create unexpected links
when running the `singleconfluence` builder.

This commit updates the merging process to replace the identifiers of
each doctree element when a conflict is detected. Elements will be given
a new identifier value, as well as elements referencing other elements
will have their reference identifiers updated as well.

Signed-off-by: James Knight <[email protected]>
Adding a unit test that verifies that generates anchors are unique for
a page, as well as references for merge pages properly link to expected
anchor points.

Signed-off-by: James Knight <[email protected]>
Adds a run of the `singleconfluence` builder into the validation set.
This can be helpful to verify the use of this builders during
development, as well as present to users who want to verify capabilities
and report observed issues that may have been overlooked.

Signed-off-by: James Knight <[email protected]>
@jdknight jdknight force-pushed the unique-references-for-singleconfluence branch from 4a5fa4a to a021298 Compare October 12, 2024 19:20
@jdknight jdknight merged commit b26ea69 into main Oct 12, 2024
24 checks passed
@jdknight jdknight deleted the unique-references-for-singleconfluence branch October 12, 2024 19:24
@jdknight jdknight added this to the 2.8 milestone Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant