<p>I did not mean to criticize.<br>
Now I see why I was under the (false?) impression that headings should be made anchor targets in the use case above:<br>
I had downloaded textadept editor, and in it's doc <a href="https://foicica.com/hg/textadept/file/b048357bd1be/doc" rel="nofollow">files</a> , after download of textadept, there was not only <code>manual.md</code> but also <code>manual.html</code> (exactly same as the online  <a href="https://foicica.com/textadept/manual.html" rel="nofollow">one</a> )<br>
That is where I found that style of TOC and references to headings, while the <code>manual.html</code> had correct anchors besides the referenced headings.<br>
I don't know precisely how Textadept's author did the conversion .md->.html (I think <a href="http://www.pell.portland.or.us/%7Eorc/Code/discount/" rel="nofollow">discount</a>.</p>
<blockquote>
<p>I don't believe either the original or CommonMark specs say anything about making headings as anchor targets.</p>
</blockquote>
<p>You are right,  neither of them specify that.</p>
<p>The original author of Markdown, to make this<br>
page  <a href="https://daringfireball.net/projects/markdown/syntax" rel="nofollow">https://daringfireball.net/projects/markdown/syntax</a> with TOC, had simply used inline html inside the <code>.md</code> filr<br>
<a href="https://daringfireball.net/projects/markdown/syntax.text" rel="nofollow">https://daringfireball.net/projects/markdown/syntax.text</a>, like this:</p>
<pre><code>*   [Overview](#overview)
...
<h2 id="overview">Overview</h2>
</code></pre>
<p>While the authors of <a href="https://spec.commonmark.org/0.28/" rel="nofollow">https://spec.commonmark.org/0.28/</a> used <a href="https://github.com/commonmark/CommonMark/blob/master/spec.txt">this</a> <code>.md</code> source , which skips the "Contents" part entirely: I guess they used a separate tool to get the TOC in the final html.</p>
<p>However: I still think it would be useful (as even the example pages of specifications above illustrate) to have some kind of automatic support for making a TOC.<br>
What do you think?</p>
<blockquote>
<p>Are you sure you're not using some non-standard extension from some other Markdown renderer?</p>
</blockquote>
<p>Like I wrote above, I'm just using what geany and geany-plugins came with. I have no idea where to get a "non-standard extension from some other Markdown renderer ". Why do you ask?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany-plugins/issues/771#issuecomment-419729350">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ0iEQ741hrZYbQkpL_vgLINl5dY_ks5uZUilgaJpZM4WgHkb">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ8-6TUsT_wKmQosDg6N9dpICGNMdks5uZUilgaJpZM4WgHkb.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany-plugins","title":"geany/geany-plugins","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany-plugins"}},"updates":{"snippets":[{"icon":"PERSON","message":"@VictorelPetrovich in #771: I did not mean to criticize. \r\nNow I see why I was under the (false?) impression that headings should be made anchor targets in the use case above:\r\nI had downloaded textadept editor, and in it's doc [files](https://foicica.com/hg/textadept/file/b048357bd1be/doc) , after download of textadept, there was not only `manual.md` but also `manual.html` (exactly same as the online  [one](https://foicica.com/textadept/manual.html) )\r\nThat is where I found that style of TOC and references to headings, while the `manual.html` had correct anchors besides the referenced headings.\r\nI don't know precisely how Textadept's author did the conversion .md-\u003e.html (I think [discount](http://www.pell.portland.or.us/~orc/Code/discount/).\r\n\r\n\u003e I don't believe either the original or CommonMark specs say anything about making headings as anchor targets.\r\n\r\nYou are right,  neither of them specify that.\r\n\r\nThe original author of Markdown, to make this \r\n page  https://daringfireball.net/projects/markdown/syntax with TOC, had simply used inline html inside the `.md` filr \r\n https://daringfireball.net/projects/markdown/syntax.text, like this:\r\n```\r\n*   [Overview](#overview)\r\n...\r\n\u003ch2 id=\"overview\"\u003eOverview\u003c/h2\u003e\r\n```\r\n\r\nWhile the authors of https://spec.commonmark.org/0.28/ used [this](https://github.com/commonmark/CommonMark/blob/master/spec.txt) `.md` source , which skips the \"Contents\" part entirely: I guess they used a separate tool to get the TOC in the final html.\r\n\r\nHowever: I still think it would be useful (as even the example pages of specifications above illustrate) to have some kind of automatic support for making a TOC. \r\nWhat do you think?\r\n\r\n\u003e Are you sure you're not using some non-standard extension from some other Markdown renderer?\r\n\r\nLike I wrote above, I'm just using what geany and geany-plugins came with. I have no idea where to get a \"non-standard extension from some other Markdown renderer \". Why do you ask?"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany-plugins/issues/771#issuecomment-419729350"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany-plugins/issues/771#issuecomment-419729350",
"url": "https://github.com/geany/geany-plugins/issues/771#issuecomment-419729350",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [geany/geany-plugins] markdown: in html, generated TOC, the links are dead (#771)",
"sections": [
{
"text": "",
"activityTitle": "**VictorelPetrovich**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@VictorelPetrovich",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"geany/geany-plugins\",\n\"issueId\": 771,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"geany/geany-plugins\",\n\"issueId\": 771\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany-plugins/issues/771#issuecomment-419729350"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 377518363\n}"
}
],
"themeColor": "26292E"
}
]</script>