Disable [markdown [[url]] replacement](https://with.[[wikilink]])

Use case or problem

Example:
I have file named Steganography.md with explanations what is that and different links to websites.
I have other file project ideas.md in which i create markdown type link [Image Steganography with Python] (https://something/steganography-project)

Problem is when I try to confirm all possible backlinks/outgoing links it starts to replace some words from url text and url itself with wikilinks. Which breaks urls and makes already explained link less useful.

In worst case applied recommendations would change link to:
[[[Image]] [[Steganography]] with [[Python]]] (https://something/[[steganography]]-project)

I think it would be really great if wikilinks+backlinks+outgoing links skipped replacing markdown links. At least. That would solve some part of problem of making sure all files are linked and there are no “bad recommendations”

Proposed solution

I think it would be great to disable backlinks and outgoing links recommendations that replace parts of markdown link including url description

Possibly add some checkbox to enable replacing somewhere in settings.

Current workaround (optional)

I’ve tried using wikilinks themselves with description to write some links to websites, but then they become unusable as obsidian wants to create file instead of following link.

I’ve tried to find some other external plugin that would allow link to be skipped in some way from parsing, but none seemed to work.

So the only way I see it is to disable recommendations based on markdown urls and descriptions at all (optional or by default)

Related feature requests (optional)

I don’t think I’ve seen any related/similar feature request or bug.

1 Like

This sounds more like a bug. And I can’t recreate it in the Help Vault.

Can you recreate this problem in the Help Vault? Or can you recreate it in your vault with no community plugins and no custom CSS? (CSS shouldn’t matter here, but you never know.) Let’s try to isolate whether this is a plugin side effect.

Also, what version of Obsidian, and what OS?

Here I’m trying to rename a note named steganography or steganography-project, and I don’t see any change to the URL link. Only to the Markdown link.

linkUpdatingBug

I think @NeuroFox is talking about something different - as far as I understand, the problem might occur when using the “Link”-button of an “unlinked mention”. If one file is called “Steganography.md”, the url https://something/steganography-project will show up under “unlinked mentions”. If you, by mistake, click the “Link” button, the URL will no longer work.

2 Likes

Ah yes you’re right. I can reproduce this in the Help Vault.

Yeah I wonder if this is a feature request (ability to disable suggestions that are in links) or a bug (it really seems like this would never be intended.)

Yes. I run into this problem frequently. In suggested backlinks Obsidian suggests linking to strings (“words”) within URLs, and if the backlink is accepted you get the breakage that @NeuroFox reports above. I’ve seen other reports of this on the forum, too.

I don’t know if this is bug, or just a side effect of the way Obsidian works. As far as I found the only answers are to be very judicious and careful when reviewing the suggested backlinks – or just don’t bother with the suggested backlink or unlinked mentions panels at all. There’s really no way of finding mangled URLs, either, once they occur.

I’ve tried the same with two fresh vaults (Help and some test one) and both show the same behavior.

Setup

Help Vault
Obsidian v0.12.19 (Up to date, free version)
Safe Mode ON

Only plugin enabled is Outgoing Links

Within Help Vault I created:

  • articles.md (one markdown link with description)
  • Python.md (empty)
  • Steganography.md (empty)

Inside articles.md I added markdown-type link
[Image Steganography with Python](https://something/steganography-project)

Expected

Backlinks/Outgoing links ignore markdown links (description and url)

Actual

Backlinks/Outgoing links propose to insert wikilinks replacing words inside markdown link description and url.

Screenshots


Conclusion

As for me it might be feature of bug. I would prefer to either have markdown links ignored completely by default (bug) or have an option to ignore them somewhere (feature that may be useful for some people?). It breaks urls so probably more like a bug.

Also may be related that sometimes wikilinks are inserted inside code blocks continuously ([[word]] converts to [[[[word]]]] and so on). Don’t remember how to reproduce but happened yesterday.

2 Likes

Related:
Code blocks text is also affected by backlinks/outgoing links
image
image

(While having Python.md and attrs.md as files)

As code blocks can have all kinds of stuff and words I think it would be better idea to ignore code blocks in backlinks/outgoing links too, for the sake of not breaking whatever code is in a code block

1 Like

One more problem with “unlinked mentions”:
image

Lets say I have file Android.md where i write about Android OS.

Unlinked mentions try to transform part of #programming/android tag and full #android tag into wikilinks. I think there is no sense to transform tags into wikilinks (it breaks tags).

Obsidian v0.13.10

1 Like

I would like to bump this topic, since I’ve had the same issue.

Incoming and outgoing link suggestions should ignore text occurrences in code blocks and (hyper)links, because adding square brackets there would break the copy-pastable code and links.