diff --git a/src/components/CodeBlock.vue b/src/components/CodeBlock.vue index 679c143f..99056181 100644 --- a/src/components/CodeBlock.vue +++ b/src/components/CodeBlock.vue @@ -43,13 +43,13 @@ export default { // computed properties const className = computed(() => { if (props.lang === 'txt') { - return 'language-markup' + return 'language-text' } return `language-${lang.value}` }) const highlightCode = computed(() => { if (lang.value === 'txt') { - return highlight(code.value, languages['markup'], 'markup') + return highlight(code.value, {}, 'txt') } return highlight(code.value, languages[lang.value], lang.value) }) @@ -149,6 +149,11 @@ div[class~='language-markdown']::before { content: 'md'; } +div[class~='language-txt']::before, +div[class~='language-text']::before { + content: 'txt'; +} + div[class~='language-json']::before { content: 'json'; }