the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+17
@@ -0,0 +1,17 @@
|
||||
---
|
||||
import { runHighlighterWithAstro } from './dist/highlighter';
|
||||
|
||||
interface Props {
|
||||
class?: string;
|
||||
lang?: string;
|
||||
code: string;
|
||||
}
|
||||
|
||||
const { class: className, lang, code } = Astro.props as Props;
|
||||
const { classLanguage, html } = runHighlighterWithAstro(lang, code);
|
||||
---
|
||||
|
||||
<pre
|
||||
class={[className, classLanguage]
|
||||
.filter(Boolean)
|
||||
.join(' ')}><code class={classLanguage} set:html={html} /></pre>
|
||||
Reference in new issue
Block a user