Skip to content

Fixed link building#133

Open
patrick-sil wants to merge 1 commit intouseblocks:mainfrom
patrick-sil:main
Open

Fixed link building#133
patrick-sil wants to merge 1 commit intouseblocks:mainfrom
patrick-sil:main

Conversation

@patrick-sil
Copy link

This PR is supposed to resolve #123

However, let me add to the description of the issue above that it also applies to internal references inside the PDF, hence, currently :ref: or :numref: are not working for sub-headlines in any case.

The suggested changes here, should fix the issue for both the HTML and the PDF.

What does my solution do:

  1. Introduces a new function which
  2. Does check on whether the link actually contains a #
  3. If so, it does only take the part of the link of the right-hand side of the last, i.e., right most #
  4. Return the now fixed link or the original link (also works for cases where only one # is present in the link, as it basically doen't modify the link in such cases)

If anyone has a better solution, which I assume are possible, as I'm not all that familiar with this project, please suggest them.

It would be nice, if this could be resolved soon, thank you :)

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.

Link fixer fails to process cross-references in document body, causing malformed double-hash hrefs

1 participant