Open nicholaelaw opened 9 years ago
Also also, it would be nice if MacDown can generate TOC for us. Not just in the output like some editors do it, but actually insert the marks into the document.
Edit: typos.
You can let MacDown generate TOC by enabling the feature in the Preferences, and insert [toc]
in the document.
OK, I'll try when I get home. What about the preview issue? Is there something I did wrong?
What version are you using? The plain text problem should have been resolved some time ago.
Hmm……strange. I'll have to get back to you on that but I think I'm using the latest version, based on the fact that I only downloaded and started using MacDown last week, and because I checked updates this afternoon and there was no update. I'll follow up with more definitive answer later tonight. Thanks for your time though.
No need to worry, I was just checking to make sure. What you experienced might as well be another bug, not the one I fixed.
OK, I've checked. I'm running version 0.5(670), which should be the latest. So I'm not sure if I did something wrong or there is indeed a bug.
As for the TOC generation feature, I actually meant something different. What the "Detect table of content token" option does is to generate a TOC in the rendered document. Which is nice if that is the end of the workflow.
What I was suggesting, was to actually insert the code for a table of content, much like the one I made manually. There was a script that does this, but it wasn't an integrated solution, among other problems.
I second this feature request. Instead of having TOC as preview, please help to generate the markdown syntax for the TOC. The use case for this is to copy the markdown syntax as is (with TOC) to elsewhere (Github README / wiki) and the TOC is still available.
+1 for me, this is the most useful feature a markdown editor can offer
[toc]
is not sufficient when the intended consumer of the document will not be using macdown
Could we do something with metadata in a comment to allow macdown to control the TOC a la [toc]
?
e.g.
<!-- macdown toc start - do not edit -->
this section would include markdown automatically generated by macdown
and macdown would automatically update it when the document changes
<!-- macdown toc end - do not edit -->
+1
I'd love a way to generate the ToC markdown.
Habe you tried https://derlin.github.io/bitdowntoc? It supports github and also has a CLI (https://github.com/derlin/bitdowntoc)
A universal Markdown TOC generator with presets for GitHub, BitBucket Server, Gitlab, dev.to, and more! Open-source, free, no trackers.
I looked around and did not see any issues related to this topic.
I sometimes want to generate a toc at the beginning section of a long document and for now I'm doing it by hand:
But this messes up the preview. Seen in the screenshot.
At first texts immediately after the div mark eg. section titles stops rendering, and after a few saves whole sections are showing in plain text. Maths and HTML stays fine, and the file renders fine in Jekyll, just not in MacDown Preview.
Also in the screenshot you can see I used the liquid mark
{% raw %}
which MacDown doesn't recognize. It would be nice MacDown can process it.