Skip to content

Commit

Permalink
fix: don't highlight text code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepKockelkorn committed Mar 17, 2024
1 parent 567dbb1 commit 0e0e840
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/github.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export function convertMarkdownToHtml(requestUrl: URL, markdown: string) {
}

// Apply syntax highlighting
const out = hljs.highlightAuto(code).value;
if (out && out !== code) {
const out = lang === 'text' ? code : hljs.highlightAuto(code).value;
if ((out && out !== code) || lang === 'text') {
escaped = true;
code = out;
}
Expand Down

0 comments on commit 0e0e840

Please sign in to comment.