Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-11330

Markdown local links don't work - issue #6315 extension

    XMLWordPrintable

Details

    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

      Attachments

        Activity

          People

            Unassigned Unassigned
            be6429d20fc3 Russell Peake
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: