diff options
author | 2023-07-03 05:59:43 -0700 | |
---|---|---|
committer | 2023-07-03 20:59:43 +0800 | |
commit | 2fea174303ca60f4765c6294d99ebc7a19e73403 (patch) | |
tree | 671f1f27d6d0827e51aaa20704b7f6154ad5d053 /packages/integrations/mdx/src/remark-shiki.ts | |
parent | fc6826ff7620b0c5e419de93ef7c463a12fe3652 (diff) | |
download | astro-2fea174303ca60f4765c6294d99ebc7a19e73403.tar.gz astro-2fea174303ca60f4765c6294d99ebc7a19e73403.tar.zst astro-2fea174303ca60f4765c6294d99ebc7a19e73403.zip |
feat: use typescript-eslint@v6's reworked configs (#7425)
Diffstat (limited to 'packages/integrations/mdx/src/remark-shiki.ts')
-rw-r--r-- | packages/integrations/mdx/src/remark-shiki.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/integrations/mdx/src/remark-shiki.ts b/packages/integrations/mdx/src/remark-shiki.ts index 3f3310de7..83625051e 100644 --- a/packages/integrations/mdx/src/remark-shiki.ts +++ b/packages/integrations/mdx/src/remark-shiki.ts @@ -69,7 +69,6 @@ const remarkShiki = async ({ langs = [], theme = 'github-dark', wrap = false }: if (langExists) { lang = node.lang; } else { - // eslint-disable-next-line no-console console.warn(`The language "${node.lang}" doesn't exist, falling back to plaintext.`); lang = 'plaintext'; } @@ -77,7 +76,7 @@ const remarkShiki = async ({ langs = [], theme = 'github-dark', wrap = false }: lang = 'plaintext'; } - let html = highlighter!.codeToHtml(node.value, { lang }); + let html = highlighter.codeToHtml(node.value, { lang }); // Q: Couldn't these regexes match on a user's inputted code blocks? // A: Nope! All rendered HTML is properly escaped. |