Skip to content

Commit

Permalink
fixup! fixup! Add 'astro' language integration
Browse files Browse the repository at this point in the history
  • Loading branch information
HynekS committed May 17, 2023
1 parent 19a05bf commit d4f0e68
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/prism-astro.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
(function (Prism) {
Prism.languages.astro = Prism.languages.extend("tsx", {
Prism.languages.astro = Prism.languages.extend('tsx', {
comment: Prism.languages.tsx.comment.concat([
{
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
greedy: true,
},
]),
});
Prism.languages.insertBefore("astro", "prolog", {
"component-script-block": {
Prism.languages.insertBefore('astro', 'prolog', {
'component-script-block': {
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
lookbehind: true,
greedy: true,
inside: {
punctuation: /^---|---$/,
"component-script": {
'component-script': {
pattern: /\S+(?:\s+\S+)*/,
inside: Prism.languages.typescript,
},
},
},
});
})(Prism);
}(Prism));

0 comments on commit d4f0e68

Please sign in to comment.