Markdown links to anchors not working?

Hi, I must be doing something wrong, but cannot figure out why links to anchors within a post are not working.

For example within a post on my page ‘https://nzarchitecture.net.nz/t/terms-of-service/15076
the link:
* [Important Terms](https://nzarchitecture.net.nz/t/terms-of-service/15076#heading--important-terms)

does not skip to this heading further down the page:
## [Important Terms](https://nzarchitecture.net.nz/t/terms-of-service/15076#heading--important-terms)

What am I missing?
Looking at the markdown in the standard/original Discourse Terms of Service page as my example, this appears to be the correct syntax

As Deep Linking to Headings (Anchors) mentions, there is no standard markdown way of creating a heading with an anchor.

I’m afraid you’ll have to use HTML:

<h2 id='heading--important-terms'>Important Terms</h3>
A quick demo

Go to end of demo

[Go to end of demo](#heading--end-of-demo)

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v

End of Demo
<h2 id='heading--end-of-demo'>End of Demo</h3>

4 Likes

thanks xrax3nz
That is what I am resorting to right now as it happens - but if you check out the markdown in the standard Terms of Use page of this forum, the syntax looks quite different. Trying to understand why

By looking at the unformatted markdown provided in Updated Terms of Service Template, I can’t see any difference? Maybe I’m missing something else?

Links are defined as:

- [Important Terms](#heading--important-terms)

And the headers:

<h2 id="heading--important-terms"><a href="#heading--important-terms">Important Terms</a></h2>
2 Likes

Hmm, interesting.
I was deriving the markdown by copying and pasting a copy of this forum’s terms of service into a new post on my own forum - which generated a quite different looking syntax (long story - but basically my built in terms of service were somehow deleted, and this is all an effort to recreate)
Perhaps that was my problem, and extraneous url information is being added when I try pasting between sites.
.
Edit - thanks for that link - those templates were pretty handy. Shame no easy way to put them in the original built-in category

1 Like