Currently the link opens as google.com==, which often breaks it. There’s currently no easy way to have a URL highlighted.
Proposed solution
We can have Obsidian detecting ==URL== patterns (with the preceding ==) and prioritizing the “==” as highlight markdown rather than the part of a URL.
Meaning, URL== would be treated as a full URL, while ==URL== would be intelligently parsed as a highlighted URL.
This way:
Link opens correctly, without the == markdown
Subsequent text is displayed without the highlight
Any link that contains “==” would still be functional (since it does not start with == before the protocol indicator)
Current workaround (optional)
Need to add space ==https://google.com ==, but it is an ugly solution & renders the highlight with a trailing space
The problem I have with this approach is that it stays in direct contradiction with one of Obsidian’s principles its been built on, namely that data is yours, is software-agnostic and therefore free to move to any other markdown-based app.
Granted, that’s just some HTML syntax, but it would still break all notes if you move to a markdown-only/no html editor (or require batch processing)
Fundamentally, it’s a rendering issue, not a markup issue. And it’d be great if it could be solved on the presentation layer only
Wrapping the URL in angle brackets appears to work. Would that be workable for you if this isn’t resolved as a feature request? Or does it not work in your local vault?
No, you are incorrect. The behavior is actually comply with markdown. Here is the render in VS Code, which is a very versatile markdown editor. It won’t render either.
By non-compliant I meant the HTML syntax approach.
The workaround proposed is to mix markdown syntax with HTML syntax (<a> tags). However, that would break in any other editor since it relies on a local css class. Obviously, not the end of the world, but far from elegant for sure.
@gupa neat, wasn’t aware of the angel bracket MD syntax for links. That does indeed solve the highlight spillover issue, the question remaining would be how to implement it so that it’s automatically added under the very same Obsidian highlight shortcut
Okay, your concern on CSS injection is valid. Live with it in Obsidian for so long that I forgot you can’t do it for in apps (but you can for VSCode :)) )