Skip to content

Commit d45e754

Browse files
committed
only do language-specific highlighting when the user has asked for it, to match GitHub's Preview behavior (fixes #77)
1 parent 7118f7b commit d45e754

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/enhancers/github/github-common.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ function githubHighlighter(code: string, language?: string) {
2121
const result = hljs.highlight(code, { language })
2222
return result.value
2323
} else {
24-
const result = hljs.highlightAuto(code)
25-
return result.value
24+
return code
2625
}
2726
} catch (error) {
2827
console.warn('highlight.js highlighting failed:', error)

0 commit comments

Comments
 (0)