@astrojs/prism
Advanced tools
Comparing version 1.0.0 to 1.0.1
# @astrojs/prism | ||
## 1.0.1 | ||
### Patch Changes | ||
- [#4251](https://github.com/withastro/astro/pull/4251) [`1f0dd31d9`](https://github.com/withastro/astro/commit/1f0dd31d9239b5e3dca99c88d021e7a9a3e2054d) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Fix `<Prism />` component indentation | ||
Prefer `class="language-plaintext"` to `class="language-undefined"` | ||
## 1.0.0 | ||
@@ -4,0 +12,0 @@ |
@@ -6,6 +6,6 @@ import Prism from "prismjs"; | ||
function runHighlighterWithAstro(lang, code) { | ||
let classLanguage = `language-${lang}`; | ||
if (!lang) { | ||
lang = "plaintext"; | ||
} | ||
let classLanguage = `language-${lang}`; | ||
const ensureLoaded = (language) => { | ||
@@ -12,0 +12,0 @@ if (language && !Prism.languages[language]) { |
{ | ||
"name": "@astrojs/prism", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Supports Prism highlighting in Astro projects", | ||
@@ -5,0 +5,0 @@ "author": "withastro", |
@@ -8,8 +8,6 @@ import Prism from 'prismjs'; | ||
export function runHighlighterWithAstro(lang: string | undefined, code: string) { | ||
let classLanguage = `language-${lang}`; | ||
if (!lang) { | ||
lang = 'plaintext'; | ||
} | ||
let classLanguage = `language-${lang}`; | ||
const ensureLoaded = (language: string) => { | ||
@@ -16,0 +14,0 @@ if (language && !Prism.languages[language]) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
22114