Closed Matt-Sim closed 9 months ago
fyi: the Obsidian D2 plugin does follow internal links as expected.
For comparison, the svg anchors are rendered as follows:
<!-- Obsidian, D2 plugin -->
<a
href="y"
xlink:href="y"
class="internal-link"
data-href="y"
target="_blank"
rel="noopener"
><g id="y"
><g class="shape"
><rect
x="0.000000"
y="0.000000"
width="245.000000"
height="66.000000"
class="stroke-B1 fill-B6"
style="stroke-width: 2"
></rect></g
><text
x="122.500000"
y="38.500000"
class="text-bold fill-N1"
style="text-anchor: middle; font-size: 16px"
>y: d2 link does not work</text
></g
></a
>
<!-- VS Code, D2 extension -->
<a href="y" xlink:href="y"
><g id="y"
><g class="shape"
><rect
x="0.000000"
y="0.000000"
width="245.000000"
height="66.000000"
class="stroke-B1 fill-B6"
style="stroke-width: 2"
></rect></g
><text
x="122.500000"
y="38.500000"
class="text-bold fill-N1"
style="text-anchor: middle; font-size: 16px"
>y: d2 link does not work</text
></g
></a
>
The markdown extension is actively denying this. These are the allowed link types, according to the markdown extension:
const passThroughLinkSchemes = ['http:', 'https:', 'mailto:', 'vscode:', 'vscode-insiders:'];
Unfortunately, once we pass the
Need
It is very valuable to navigate to the local .md file of the linked item. Also, this desired behaviour would be consistent with the normal behaviour of local .md links.
Example
x.md: