Wikilinks in Markdown not working if a line starts with soft tabs

DT3 Pro 3.5.2
macOS 10.15.7

I have the Wikilinks option enabled with “Names and Aliases”. I noticed that if a line begins with a soft tab (i.e., \t) in a markdown file, then words that follow it will not become wikilinks.

I think you can reproduce it by

  1. open a markdown document in DT3
  2. write some words that become a wikilink
  3. insert a soft tab (hit a Tab key) in the beginning of the line
  4. see the wikilink turned off

This is problematic for me, as I often use wikilinks for listing and use soft tabs to indent items in the list. I can use 4 spaces to indent items, but soft tabs are more convenient for me. Also, I found that wikilinks with square brackets (i.e., [[wikilink]]) work correctly with soft tabs, but I am a not big fan of them. Until this issue is resolved, however, I guess I have to stick with these workarounds.

So I am wondering whether (1) this behavior happens only in my environment, and (2) if not, it is possible that this behavior is changed in the future.

Welcome @bbeki

I have confirmed the behavior here. Development will have to assess this. Thanks for your patience and understanding.

This is intentional as tabs at the beginning are used to mark code and Wiki links inside code don’t make that much sense.

1 Like

Thanks @BLUEFROG and @cgrunenberg.

I understand that tabs at the beginning indicate code, and wiki links inside code do not make much sense.

However, I am confused when I use tabs to indent an item in a list. It seems that DT correctly renders the line as an indented item, not code. Yet, the indented item cannot contain wiki links.

Hope that the attached image clarifies what I am talking about.

Wikilinks

Two indented items “wiki link (Tabs)” and “wiki link (4 spaces)” are rendered in the same way, but only the latter contains a wiki link. If they are rendered as list items, I expect that they function as list items. For your reference, the image also shows what a code block with hyphen looks like (in my css).

I hope that developers assess this particular behavior and come up with some consistent rendering/functioning. I know that sometimes parsing MMD is not easy, and I will respect their decision in any way (after all, I cannot live without DT3 and there always exist workarounds).

A future release will probably fix this. In the meantime spaces might be a good workaround.

The next release will fix this.

@Kourosh might want to take note of this fix since, if I recall correctly, he recommends in his book on taking notes with DEVONthink that using tabs at the beginning of the line is a way to avoid wiki linking.

In code blocks (see e.g. “code block with hyphen” above) Wiki links will still not be added.

1 Like

@korm

/me … cracks knuckles, wondering about typing a next update …

1 Like

By the way if I knew it beforehand I would have written another script. If you need something let me know.

Hey @pete31 - that’s awesome to know. I don’t want to make any presumptions.