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

Links point to the wrong place if markdown files have the same name #691

Closed
erickzhao opened this issue Nov 28, 2024 · 0 comments · Fixed by #690
Closed

Links point to the wrong place if markdown files have the same name #691

erickzhao opened this issue Nov 28, 2024 · 0 comments · Fixed by #690
Assignees
Labels
area:prebuild Related to the prebuild scripts 🪲 bug Something isn't working

Comments

@erickzhao
Copy link
Member

Well well well, if it isn't the consequences of our own assumptions.

/**
* Filenames in Electron docs are usually unique so best effort
* consist on using the filename (basename) to identify the right
* place where it should point.
*/
const linksMaps = new Map();
for (const filePath of files) {
linksMaps.set(path.basename(filePath), filePath);
}

We initially implemented the above map to fix a bunch of potentially misplaced links from upstream. However, this causes a problem where we get collisions for documents with the same basename.

This breaks things such as the first link in https://www.electronjs.org/docs/latest/tutorial/navigation-history, which is supposed to point to the API class according to the raw documentation on electron/electron.

@erickzhao erickzhao added 🪲 bug Something isn't working area:prebuild Related to the prebuild scripts labels Nov 28, 2024
@erickzhao erickzhao self-assigned this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:prebuild Related to the prebuild scripts 🪲 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant