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

Check local links as part of cross-references checks #2187

Merged
merged 5 commits into from
Jul 20, 2023

Conversation

mortenpi
Copy link
Member

And produce proper docerrors (as opposed to warnings in HTMLWriter). Fix #2130.

This needed quite a bit of refactoring to move the link checking logic from HTMLWriter to CrossReferences. CrossReferences now replaces the local links & images it finds with PageLink / LocalLink / LocalImage elements that the writers then should be able to safely use to generate the correct hyperlinks.

I did notice that local link handling appears to be somewhat broken in LaTeXWriter. In some cases it seems to generate a link ID that probably doesn't exists (from the fragment), and in other cases the links just point to the .md file. Not quite sure what to do here, and I'm inclined to leave the implementation broken for the time being.

@mortenpi mortenpi enabled auto-merge (squash) July 20, 2023 04:21
@mortenpi mortenpi merged commit c5938a7 into master Jul 20, 2023
@mortenpi mortenpi deleted the mp/check-local-links branch July 20, 2023 04:26
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.

Doccheck to check local links
1 participant