I did not mean to criticize. 
Now I see why I was under the (false?) impression that headings should be made 
anchor targets in the use case above:
I 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) )
That is where I found that style of TOC and references to headings, while the 
`manual.html` had correct anchors besides the referenced headings.
I don't know precisely how Textadept's author did the conversion .md->.html (I 
think [discount](http://www.pell.portland.or.us/~orc/Code/discount/).

> I don't believe either the original or CommonMark specs say anything about 
> making headings as anchor targets.

You are right,  neither of them specify that.

The original author of Markdown, to make this 
 page  https://daringfireball.net/projects/markdown/syntax with TOC, had simply 
used inline html inside the `.md` filr 
 https://daringfireball.net/projects/markdown/syntax.text, like this:
```
*   [Overview](#overview)
...
<h2 id="overview">Overview</h2>
```

While 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.

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. 
What do you think?

> Are you sure you're not using some non-standard extension from some other 
> Markdown renderer?

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?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/771#issuecomment-419729350

Reply via email to