From 8e8f74df972211ddfe56c091e35f2050721f3fe6 Mon Sep 17 00:00:00 2001 From: HaloGamer33 <106188903+HaloGamer33@users.noreply.github.com> Date: Sat, 11 Apr 2026 08:03:14 -0600 Subject: [PATCH] fix(snippets): use regex to strip encoding from copied text --- src/config/io/markdown.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config/io/markdown.ts b/src/config/io/markdown.ts index c0a9088..c3ae93c 100644 --- a/src/config/io/markdown.ts +++ b/src/config/io/markdown.ts @@ -166,7 +166,10 @@ const shikiCopyButton: ShikiTransformer = { role: "button", "aria-label": "Copy to clipboard", "alia-live": "polite", - "data-code": this.source, + "data-code": this.source.replace( + /TYPE99(\w+.)99TYPE/g, + (_full: string, match: string) => getQMLTypeLinkObject(match).name, + ), onclick: ` navigator.clipboard.writeText(this.dataset.code); this.classList.add('copied');