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

Relative anchors do not work #47

Open
thebouv opened this issue Dec 14, 2020 · 2 comments
Open

Relative anchors do not work #47

thebouv opened this issue Dec 14, 2020 · 2 comments
Labels

Comments

@thebouv
Copy link

thebouv commented Dec 14, 2020

It seems like you all added support for relative links recently, but it doesn't work for relative anchors.

So if I say something like

Please see [the section below](#the-section-below)

The links don't work. They get 'http://' added in front of them which is wrong.

@kovetskiy
Copy link
Owner

kovetskiy commented Dec 15, 2020

I'm afraid that Confluence adds this http:// prefix to URLs on its own. Could you check it on your side too?

Add --trace flag and check HTML content that mark rendered, then check HTTP request that mark sent.
I see a correct html:

<p>Please see <a href="#the-section-below">the section below</a></p>

But then, as you mentioned, I see this http://#the-section-below on the page.

@kovetskiy kovetskiy added the bug label Jan 18, 2021
@GezimSejdiu
Copy link
Contributor

GezimSejdiu commented Apr 28, 2021

Hey @thebouv ,

with the latest version of mark:5.7 it seems to work as soon as you specify the #PageName-anchor e.g.

Please see [the section below](#pagename-the-section-below)

The downside of this is that you can't navigate on the markdown (i.e. VSCode, or GitHub) anymore as that isn't reachable on the page.

PS: This was tested only on the headers which were part of ac:toc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants