[Github-comments] [geany/geany-plugins] markdown: in html, generated TOC, the links are dead (#771)

VictorelPetrovich notifications at xxxxx
Mon Sep 10 05:50:18 UTC 2018


Thanks for the answer.
 I was going to close this issue myself too, as I was mistaken when posting it.

The renderer / converter of this plugin sticks to commonMark spec. I personally think there would be nothing wrong with giving the users an option to "break" the Cmark standard by supporting some  tables or code-highlight syntax (that commonmark.org has very slow progress, if any, on these questions).  
But there are technical and time problems - I get it.

Still, the name of this plugin - `Markdown` - suggests that this plugin does not have to be restricted to converting to `html` only; and already, showing a live preview of the `html` is not something implemented by [Cmark](https://github.com/commonmark/cmark) itself.

Instead, this plugin could, in principle, incorporate other extensions which have nothing to do with Markdown standard.
One of them could be:
- an option to  generate a TOC inside the `.md` file, based on the headings in this file, and then also adding some anchor tags with `id` beside each heading. It could be done at a button click / shortcut key (i.e, does not have to be done live, like the preview), so that not to make it slower, if that's is a problem
The job of the html previewer would remain as is.

Does it make sense? I could open a separate issue for this if yes.

For my own use, I prepared a method involving a sequence of 9 (!) regex substitutions, plus couple of copy-paste, that, after all applied,  result getting a TOC in the .md file which is functional in the .html file. Obviously, a bit tedious.

I could share them if anyone else needs it. 

-- 
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-419794813
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180909/d57f1524/attachment.html>


More information about the Github-comments mailing list