Here’s a small weird thing I just noticed.
If there’s a colon in a heading line in a markdown file, the TOC link won’t take you to that heading. A semi colon works.
I know colons have extra value in markdown rendering (have a colon in the first line of a doc? That line won’t show up if the file is transcluded)
Not sure if that’s all intentional markdown behaviour but maybe this will help someone.
Also, I haven’t tested this on desktop, just iOS 15.1 and latest DTTG
AFAIK this is true only for the first line(s) of a Multimarkdown file. In that dialect, it indicates metadata. Since DT uses MMD, you mustn’t use a colon in the first line(s) of your markdown file unless they are metadata.
This has recently been discussed here, too.
Did you try to escape the colon \:
?
I guess it’s a little more than just that. Colons in header rows also change TOC link behaviour. I’ll assume it’s intentional behaviour on the part of the MMD engine, and note it here for further reference. If it’s not intentional, it’s been noted here and can be dealt with as any other bug fix.
I just tried this. The slash doesn’t render in preview mode (good) but it also doesn’t change the link functionality of that header in the TOC (not great)
To be clear, this isn’t a huge problem, for me at least. Just something I noticed when I added a new formatted entry to my journal template.
After the above post, I realized that all the headings in my journal docs already had colons in them as part of the time notation and that hadn’t caused any problem with the link/go-to behaviour of the TOC, I did a bit more experimentation which has shown me that it’s not consistent.
In one doc with about 11 entries, 3 of which have a second colon in the heading text, 2 of them don’t “work”. I’ve tried variations of none or 1 space before/after the colon and the \ escape and I couldn’t figure out a pattern.
It’s easy enough for me to fix by using a dash instead of the colon.
i do not see any problem with a TOC when the header contain colons (note: no header in first line!): All two headlines are links. Nothing changes when I put a second colon in the headers.
Weird enough, when I put a headline with colon in the first line and the TOC marker in the second one, the first line does not appear as a headline in the text editor but in the markup and the TOC.
I suggest that instead of describing the problem, you show the relevant markup file so that other people have a chance to see and verify what is happening.
I’m not seeing any issue here…
Headings with Colons.md (3.9 KB)
This file is jumping to the headings from a TOC in DEVONthink To Go.
Yeah, I’m seeing it very inconsistently here too. It might be something else entirely.
I’ve been meaning to but I’ll have to de-personalize some docs to do that. Going to keep experimenting with this.