Details
-
Bug
-
Resolution: Fixed
-
Low
-
3.7.2, 3.8.0
Description
When an anchor link is used in a markdown file, it will only work on the default (usually master) branch. This looks to be likely caused by the ?at=refs%2Fheads%2Fbranch-name that's appended to the end of the URL.
Steps to reproduce
- Create a new branch.
- Create a new markdown document that includes a named anchor <a name="TOC"></a> and a link to that anchor [contents](#TOC).
- Push the new branch to Stash.
- Open the repository's Source page in Stash.
- Switch to displaying the new branch.
- Open the markdown document.
- Click on the link and nothing happens, but it should jump to the anchor location.
The link used is http://stash.company.com/projects/PROJ/repos/repo/browse/test.md?at=refs%2Fheads%2Ftest-branch#TOC?at=refs%2Fheads%2Ftest-branch.
Expected Result
The URL that is generated should be something along the lines of http://stash.company.com/projects/PROJ/repos/repo/browse/test.md?at=refs%2Fheads%2Ftest-branch#TOC and scroll to the appropriate location.
Attachments
Issue Links
- is duplicated by
-
BSERV-7461 Stash Readme.md anchor tags always redirect to default branch
- Closed
-
BSERV-7879 markdown links within a document don't render properly, because they incorrectly include a query string
- Closed