summaryrefslogtreecommitdiff
path: root/packages/markdown/remark/src
diff options
context:
space:
mode:
authorGravatar tony-sull <tony-sull@users.noreply.github.com> 2022-06-20 17:14:08 +0000
committerGravatar github-actions[bot] <github-actions[bot]@users.noreply.github.com> 2022-06-20 17:14:08 +0000
commit9502fbf4a9ca8701629be9a7dcf955ae78541fbe (patch)
treef24d194d37744ff7b94ccfba9bd211a7e44408f9 /packages/markdown/remark/src
parent80c71c7c56d15dc05ec0c5a848130aad222d7d51 (diff)
downloadastro-9502fbf4a9ca8701629be9a7dcf955ae78541fbe.tar.gz
astro-9502fbf4a9ca8701629be9a7dcf955ae78541fbe.tar.zst
astro-9502fbf4a9ca8701629be9a7dcf955ae78541fbe.zip
[ci] format
Diffstat (limited to 'packages/markdown/remark/src')
-rw-r--r--packages/markdown/remark/src/remark-escape.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/packages/markdown/remark/src/remark-escape.ts b/packages/markdown/remark/src/remark-escape.ts
index 312bbe2cd..dd8a921ff 100644
--- a/packages/markdown/remark/src/remark-escape.ts
+++ b/packages/markdown/remark/src/remark-escape.ts
@@ -1,5 +1,5 @@
-import { visit } from 'unist-util-visit';
import type { Literal } from 'unist';
+import { visit } from 'unist-util-visit';
// In code blocks, this removes the JS comment wrapper added to
// HTML comments by vite-plugin-markdown.
@@ -10,8 +10,6 @@ export default function remarkEscape() {
};
function removeCommentWrapper(node: Literal<string>) {
- node.value = node.value
- .replace(/{\/\*<!--/gs, '<!--')
- .replace(/-->\*\/}/gs, '-->');
+ node.value = node.value.replace(/{\/\*<!--/gs, '<!--').replace(/-->\*\/}/gs, '-->');
}
}