From d45e7541a96374f45f2700874f6304970dc8f364 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Wed, 24 Sep 2025 12:30:50 -0700 Subject: [PATCH] only do language-specific highlighting when the user has asked for it, to match GitHub's Preview behavior (fixes #77) --- src/lib/enhancers/github/github-common.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/enhancers/github/github-common.ts b/src/lib/enhancers/github/github-common.ts index 3917aad..b52a06c 100644 --- a/src/lib/enhancers/github/github-common.ts +++ b/src/lib/enhancers/github/github-common.ts @@ -21,8 +21,7 @@ function githubHighlighter(code: string, language?: string) { const result = hljs.highlight(code, { language }) return result.value } else { - const result = hljs.highlightAuto(code) - return result.value + return code } } catch (error) { console.warn('highlight.js highlighting failed:', error)