You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support .mmd (mermaid extension) and improve mermaid rendering #1893
For all's convenience, please use English to fill this issue.
Is your feature request related to a problem? Please describe.
can't detect mmd extension files
And renders with mermaid (in md files) are far from perfect.
with P1[1. ATTENTION]
text cut even if enough space in width
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
This explanation is insufficient for users of the MSI version. I’ve performed a deep search on my drive (using 'Everything'), and the mermaid.min.js file is nowhere to be found in the QuickLook installation folders.
It seems the Markdown plugin is now directly integrated into the source files rather than being a standalone, modifiable package. Could you clarify how we are supposed to apply this update manually, or plan to include this fix in the next official release?
Finally after a long fight, helped by claude sonnet 4.6
yes this script solve the "Unsupported markdown: list" problem
I can't use Visual Studio my disk is too small... So I used dnSpy. But impossible to find how to do it through the interface so Claude made me a script
close outlook and dnSpy
# ============================================================
# Embed mermaid.min.js into QuickLook.Plugin.MarkdownViewer.dll
# Fixes "Unsupported markdown: list" / mermaid diagrams not rendering
# Requires: dnlib.dll (included with dnSpy)
# Requires: mermaid.min.js (download from https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js)
# ============================================================
# --- Edit these paths ---
$dnlibPath = "C:\Users\xxx\Downloads\dnSpy-net-win64\bin\dnlib.dll"
$dllPath = "C:\Users\xxx\AppData\Local\Programs\QuickLook\QuickLook.Plugin\QuickLook.Plugin.MarkdownViewer\QuickLook.Plugin.MarkdownViewer.dll"
$jsPath = "C:\Users\xxx\Desktop\mermaid.min.js"
# ------------------------
# Resource key expected by md2html.html (<script src="js/mermaid.min.js">)
$resName = "QuickLook.Plugin.MarkdownViewer.Resources.js\mermaid.min.js"
# Load dnlib (part of dnSpy) to manipulate the .NET assembly
Add-Type -Path $dnlibPath
$module = [dnlib.DotNet.ModuleDefMD]::Load($dllPath)
$jsBytes = [System.IO.File]::ReadAllBytes($jsPath)
# Remove existing entry if present (e.g. when re-running the script)
$existing = $module.Resources | Where-Object { $_.Name -eq $resName }
if ($existing) { $module.Resources.Remove($existing) | Out-Null }
# Embed mermaid.min.js as a binary resource inside the DLL
$res = [dnlib.DotNet.EmbeddedResource]::new($resName, $jsBytes, [dnlib.DotNet.ManifestResourceAttributes]::Public)
$module.Resources.Add($res)
# Write to a temp file first to avoid file-lock issues, then replace
$tmpPath = $dllPath + ".tmp"
$module.Write($tmpPath)
Move-Item -Force $tmpPath $dllPath
Write-Host "Done."
About the other issue: node labels truncated in mermaid diagrams
When QuickLook opens, mermaid renders the diagram based on the initial window size. Node labels that exceed the box width get clipped and are not fully displayed. There is no scrollbar, and resizing the window to fullscreen does not trigger a re-render, so the truncated text stays as-is.
A possible workaround could be to force a mermaid re-render when the window is resized or maximized, though this would require changes to md2html.html.
.mmd from your example → no render
the other one → titles incomplete, \n not taken into account (still not supported with the last mermaid script you gave above)
@emako Hi. I saw the updates around this. We can see the problem is still there on Obsidian with num lists but something else is appearing in this picture a problem with color frame and arrow not visible. You can see the expected result lower behind
Activity
emako commentedon Mar 18, 2026
Can you provide a
.mmdfile that renders exceptions?(or.md)emako commentedon Mar 18, 2026
I'm not sure if the latest version of mermaid covers your needs.
3C0D commentedon Mar 23, 2026
This explanation is insufficient for users of the MSI version. I’ve performed a deep search on my drive (using 'Everything'), and the mermaid.min.js file is nowhere to be found in the QuickLook installation folders.
It seems the Markdown plugin is now directly integrated into the source files rather than being a standalone, modifiable package. Could you clarify how we are supposed to apply this update manually, or plan to include this fix in the next official release?
3C0D commentedon Mar 23, 2026
Finally after a long fight, helped by claude sonnet 4.6
yes this script solve the "Unsupported markdown: list" problem
I can't use Visual Studio my disk is too small... So I used dnSpy. But impossible to find how to do it through the interface so Claude made me a script
close outlook and dnSpy
to run it
I give the process if it can help someone else
3C0D commentedon Mar 24, 2026
About the other issue: node labels truncated in mermaid diagrams
When QuickLook opens, mermaid renders the diagram based on the initial window size. Node labels that exceed the box width get clipped and are not fully displayed. There is no scrollbar, and resizing the window to fullscreen does not trigger a re-render, so the truncated text stays as-is.
A possible workaround could be to force a mermaid re-render when the window is resized or maximized, though this would require changes to md2html.html.
emako commentedon Mar 24, 2026
Do you have any suggestions for improving
md2html.html?I don’t have any Mermaid code to reproduce this issue.
emako commentedon Mar 24, 2026
I update the mermaid.min.js after commit c23731d
3C0D commentedon Mar 24, 2026
you ask to a llm to generate a mermaid example. claude chat is very good
BTW, little detail, .mmd is not rendering mermaids.
emako commentedon Mar 24, 2026
issue-1893-mermaid.zip
I said I can't reproduce it.
3C0D commentedon Mar 24, 2026
ak ok (maximise the view to make the mermaid appear)
raw code:
Mermaid with list items
graph TD subgraph Test_Bug direction TB Node1["1. PREMIER_ITEM"] Node1 -->|Lien A| SubNodeA["Détail A"] Node2["2. DEUXIEME_ITEM"] Node2 -->|Lien B| SubNodeB["Détail B"] end Start --> Node1 Start --> Node2N.B:
.mmd from your example → no render
the other one → titles incomplete, \n not taken into account (still not supported with the last mermaid script you gave above)
emako commentedon Mar 27, 2026
These effects are consistent with the rendering effects of https://mermaid.live/
Add Mermaid support and .mmd detection #1893
3C0D commentedon Jul 26, 2026
@emako Hi. I saw the updates around this. We can see the problem is still there on Obsidian with num lists but something else is appearing in this picture a problem with color frame and arrow not visible. You can see the expected result lower behind
emako commentedon Jul 27, 2026
3C0D commentedon Jul 28, 2026
depending of the sun in room... 🤣 Well it's not invisible it's hardly visible
Add Mermaid support and .mmd detection QL-Win#1893