Skip to content

Add mermaid.live preview link#4

Open
tanishqkancharla wants to merge 2 commits into
Gurpartap:mainfrom
tanishqkancharla:add-mermaid-live-link
Open

Add mermaid.live preview link#4
tanishqkancharla wants to merge 2 commits into
Gurpartap:mainfrom
tanishqkancharla:add-mermaid-live-link

Conversation

@tanishqkancharla
Copy link
Copy Markdown

Adds a clickable preview link below each rendered mermaid diagram that opens in mermaid.live. The link uses OSC 8 terminal hyperlinks — the display text is truncated to half the terminal width, but clicking it opens the full URL with the diagram pre-loaded.

Uses pako to deflate-compress the diagram state, matching the encoding mermaid.live expects.

Show a clickable 'Preview: https://mermaid.live/...' link below each
rendered diagram. Uses OSC 8 terminal hyperlinks with the full URL as
the target, and a truncated display URL (half terminal width). The
diagram source is pako-compressed and base64url-encoded in the URL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant