Details
-
Bug
-
Resolution: Fixed
-
Medium
Description
When using links to header anchors in markdown local file links do not work. External file links work, provided they do not contain spaces. this is from within a branch, not master.
#!markdown [link](#markdown-header-header1) [link1](filename-no-spaces.md#markdown-header-header1) [link2](filename with spaces.md#markdown-header-header1) [reference another file][another-file.md#markdown-header-header1)
Link1 produces a link to the parent directory with '#markdown-header-header1'
link2 bounces around commits or branches, either way 404's are produced
link3 replaces all file spaces with %2520 over %20 (url encoded %20) and again produces 404's
reference another file link works as expected, including going to the header1 anchor.
Apologies if this is not the correct place to report this.
EDIT:
Further study has found the above is not acurate.
The problem is, for some files, they attempt to link as if they are in the master branch, when no file of that name exists in the master branch
File1 in branch 1 with link
#!markdown [link](#markdown-header-local-link)
Will try to resolve to a file that doesn't exist in the master branch and as such will link to folder/#markdown-header-local-link in the master branch
For the same reason (it seems) if the filename is added before the anchor link, it attempts to go to the master branch folder folder/filename#markdown-header-local-link and as that file doesn't exist in master it produces a 404 page. This holds true when linking to these files from other files within 'branch 1' as well