obsidian-repeat-plugin
obsidian-repeat-plugin copied to clipboard
Links inside rendered dataview blocks not clickable
For example,
```dataview
LIST FROM [[Some Note]]
\```
Generates a list of links, but the links are not clickable inside the repeat view. Should check if this is fixable.
This is what the elements look like. First one from within the dataview-rendered block, the second a working processed vanilla link
<div class="markdown-preview-sizer markdown-preview-section">
<div class="block-language-dataview node-insert-event" dir="auto" style="overflow-x: auto;">
<ul class="dataview list-view-ul">
<li><span><a data-tooltip-position="top" aria-label="Box/My Note.md"
data-href="Box/My Note.md" href="Box/My Note.md"
class="internal-link" target="_blank" rel="noopener">My Note</a></span></li>
</ul>
</div>
<p dir="auto">
<a data-href="My Note"
href="obsidian://open?vault=Vault&file=My%20Note" class="internal-link"
target="_blank" rel="noopener">My Note</a>
</p>
</div>
The issue is happening because just calling MarkdownPreviewView.renderMarkdown
doesn't handle dynamic dataview blocks, so the plugin's renderMarkdown
function doesn't have anything to fix links for.
MarkdownPreviewView.renderMarkdown
is deprecated. Maybe its successor doesn't have this issue.
I replaced https://docs.obsidian.md/Reference/TypeScript+API/MarkdownRenderer/renderMarkdown with https://docs.obsidian.md/Reference/TypeScript+API/MarkdownRenderer/render and the issue persists with the latest Dataview version.