Remove prism warning when no language is provided (#1703)

* Remove prism warning when no language is provided

* Add the plaintext language instead
This commit is contained in:
Matthew Phillips 2021-10-29 14:27:37 -04:00 committed by GitHub
parent cb733cf689
commit eb7c63b2d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ function runHighlighter(lang: string, code: string) {
let classLanguage = `language-${lang}`
if (lang == null) {
console.warn('Prism.astro: No language provided.');
lang = 'plaintext';
}
const ensureLoaded = (lang: string) => {