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

markdown link anchor issue #3784

Closed
2 of 7 tasks
tst2005 opened this issue Apr 11, 2018 · 2 comments · Fixed by #4058
Closed
2 of 7 tasks

markdown link anchor issue #3784

tst2005 opened this issue Apr 11, 2018 · 2 comments · Fixed by #4058
Labels
Milestone

Comments

@tst2005
Copy link

tst2005 commented Apr 11, 2018

Description

A markdown link with anchor is rendered as a html URL page%23anchor instead of page#anchor.
On https://try.gitea.io/g/test-anchor-bug/src/branch/master/README.md
the link to "foo.md#bar" is
https://try.gitea.io/g/test-anchor-bug/src/branch/master/foo.md%23bar
but should be
https://try.gitea.io/g/test-anchor-bug/src/branch/master/foo.md#bar

The README.md content:

# test-anchor-bug

* [link bug 1](foo.md#bar)
* [link bug 2][bug2]

[bug2]: foo.md#bar

Screenshots

Screenshot is not usefull.

@tst2005
Copy link
Author

tst2005 commented Apr 11, 2018

FYI,

I'm using nginx as frontal and gitea as backend.
My current workaround for this bug is:

server {
   server_name my.domain.tld;
   location /gitea/ {
      # workaround about markdown anchor issue
      if ($request_uri ~ ^(/.*\.md)%23(.*)$ ) { return 301 $scheme://$server_name$1#$2; }
      # end of workaround
      proxy_pass http://localhost:3000/;
   }
}

@ncantelmo
Copy link

Just ran into this after generating some API docs in markdown. Basically all the relative links with anchors are broken.

@lunny lunny added the type/bug label May 23, 2018
@lunny lunny added this to the 1.5.0 milestone May 23, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants