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

Invalid link: '<a href="#...">...</a>'. The file index.md doesn't contain a bookmark named '...' #5233

Open
davikor opened this issue Oct 25, 2019 · 13 comments
Labels
static-site Produce static HTML output ready for publishing to hosts like GitHub pages

Comments

@davikor
Copy link

davikor commented Oct 25, 2019

Operation System: Windows

DocFX Version Used: 2.46

Template used: default

Steps to Reproduce:

  1. download extract attached example
  2. run docfx.exe docfx.json

Expected Behavior:

Build succeeds without warnings

Actual Behavior:

Build succeeds with one warning: Invalid link: '<a href="#anchor-with-umlaut-%C3%A4">Link to anchor</a>'. The file index.md doesn't contain a bookmark named 'anchor-with-umlaut-%C3%A4'

DocFx seems to url-encode special characters (e.g. german Umlaute) in links but does not url encode the anchor names that are being generated for each heading, therefore the warning I guess. Firefox seems to be okay with that (it can navigate the links) but of course it is not obvious anymore whether ones link is really invalid or whether it just contains characters that got url encoded.

@stale
Copy link

stale bot commented Jan 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the stale label Jan 24, 2020
@davikor
Copy link
Author

davikor commented Jan 27, 2020

this issue is still valid with 2.48.1

@stale stale bot removed the stale label Jan 27, 2020
@stale
Copy link

stale bot commented Jul 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the stale label Jul 25, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

Closing this issue after a prolonged period of inactivity. If you still think this issue is relevant, please feel free to ping a maintainer or leave a comment.

@stale stale bot closed this as completed Aug 8, 2020
@superyyrrzz superyyrrzz reopened this Aug 10, 2020
@stale stale bot removed the stale label Aug 10, 2020
@AndreasGloeckner
Copy link

AndreasGloeckner commented Nov 26, 2020

We wanted to use markdig as our markdown engine and ran into the same error with it.
Everything is fine when we do not specifiy a "markdownEngineName" in our docfx.json.

Using docfx v2.56.5.

@robog3
Copy link

robog3 commented Jun 3, 2021

Hi,
We have this issue with French characters too (é, è, à, ', ...) which is a major problem for us even though the redirection works. Our CI/CD pipeline regenerates the documentation website at each commit if there are no warnings (for broken links), which makes it impossible for us to use accents in anchors as long as this issue is not solved.
Docfx v2.56.7.
Thank you!

@DavidFeldhoff
Copy link

Any news on this? We're also waiting for it.
Using Docfx v2.57.2

@GOBNilsGruettner
Copy link

Hi,

I am also encountering that problem with german Umlaute.
It is really hard to find actual non-working links. In larger projects I get >50 false warnings.

Docfx v2.58.9.0

@patware
Copy link

patware commented Dec 15, 2021

For french characters (é, è, à, ', ...), I tried saving the .md as UTF8 with and without BOM. Same warnings.

Docfx v2.58.9.0

# foo

Visit [Québec](#québec).

## Québec

The province or the city.

Warning:BuildCommand.Postprocess.HandlePostProcessorsWithIncremental.HandlePostProcessors.Processing html.ValidateBookmarkInvalid link: 'Québec'. The file index.md doesn't contain a bookmark named 'qu%C3%A9bec'.

But the rendered html link is valid:
http://localhost:8080/index.html#québec

@achikhv
Copy link

achikhv commented Jan 10, 2022

Same issue with Russian characters. As a workaround have to explicitly specify bookmark names as described here.

It's a little bit tedious, and fix is highly anticipated.

@harleydk
Copy link

Chiming in. Same issue with my Danish ø, æ and å's.

@yufeih yufeih added the static-site Produce static HTML output ready for publishing to hosts like GitHub pages label Dec 15, 2022
@yufeih
Copy link
Contributor

yufeih commented Jun 7, 2023

This seems to be a problem with markdig AutoIdentifierOptions.GitHub ignore non-ascii chars.

@salgiza
Copy link

salgiza commented Jan 26, 2024

Still fails with docfx 2.75.1. Thankfully the generated HTML works, but this is annoying as hell and makes it very hard to detect actual errors when compiling the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
static-site Produce static HTML output ready for publishing to hosts like GitHub pages
Projects
None yet
Development

No branches or pull requests