diff options
author | 2021-04-12 16:20:58 +0100 | |
---|---|---|
committer | 2021-04-12 16:20:58 +0100 | |
commit | 687ff5bacd8c776e514f53c4b59c3a67274d3971 (patch) | |
tree | 15e140d7d6c744c4b2096fea38d7f0e34fec8742 /src/compiler/transform/prism.ts | |
parent | cffde0192bf9965e94a217fa0a44a86fbfa33337 (diff) | |
download | astro-687ff5bacd8c776e514f53c4b59c3a67274d3971.tar.gz astro-687ff5bacd8c776e514f53c4b59c3a67274d3971.tar.zst astro-687ff5bacd8c776e514f53c4b59c3a67274d3971.zip |
chore fix lint reduce errors generated (#83)
* add dep domhandler imported in in src/build/static
* lint and jsDoc error
* move domhandler to devDep
* chore: add package lock
* escape string jsDoc
* chore: add astro dep in until prism import is refactored
* chore: add snowpack example package lock
Diffstat (limited to 'src/compiler/transform/prism.ts')
-rw-r--r-- | src/compiler/transform/prism.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/transform/prism.ts b/src/compiler/transform/prism.ts index 5433f3586..7848e1672 100644 --- a/src/compiler/transform/prism.ts +++ b/src/compiler/transform/prism.ts @@ -4,13 +4,13 @@ import { getAttrValue } from '../../ast.js'; const PRISM_IMPORT = `import Prism from 'astro/components/Prism.astro';\n`; const prismImportExp = /import Prism from ['"]astro\/components\/Prism.astro['"]/; - +/** escaping code samples that contain template string replacement parts, ${foo} or example. */ function escape(code: string) { return code.replace(/[`$]/g, (match) => { return '\\' + match; }); } - +/** default export - Transform prism */ export default function (module: Script): Transformer { let usesPrism = false; |