diff --git a/apps/frontend/src/frontend.ts b/apps/frontend/src/frontend.ts index 3482d7b..03705f2 100644 --- a/apps/frontend/src/frontend.ts +++ b/apps/frontend/src/frontend.ts @@ -1,8 +1,10 @@ // @ts-ignore import gleamHljs from '@gleam-lang/highlight.js-gleam' import hljs from 'highlight.js/lib/core' +import plaintext from 'highlight.js/lib/languages/plaintext' // @ts-ignore import { main } from './frontend.gleam' hljs.registerLanguage('gleam', gleamHljs) +hljs.registerLanguage('plaintext', plaintext) document.addEventListener('DOMContentLoaded', main) diff --git a/apps/frontend/src/markdown.ffi.mjs b/apps/frontend/src/markdown.ffi.mjs index 14429f9..7b4d52d 100644 --- a/apps/frontend/src/markdown.ffi.mjs +++ b/apps/frontend/src/markdown.ffi.mjs @@ -6,7 +6,7 @@ import { markedHighlight } from 'marked-highlight' const parser = new Marked( markedHighlight({ langPrefix: 'hljs language-', - highlight(code, lang, info) { + highlight(code, lang, _info) { const language = hljs.getLanguage(lang) ? lang : 'plaintext' return hljs.highlight(code, { language }).value },