fix: remove unneeded html-escaper
This commit is contained in:
parent
702ca067d4
commit
9f0d50d55c
1 changed files with 1 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
||||||
import type { ComponentInstance } from 'astro';
|
import type { ComponentInstance } from 'astro';
|
||||||
import type { RenderableTreeNode, Tag } from '@markdoc/markdoc';
|
import type { RenderableTreeNode, Tag } from '@markdoc/markdoc';
|
||||||
import Markdoc from '@markdoc/markdoc';
|
import Markdoc from '@markdoc/markdoc';
|
||||||
import { escape } from 'html-escaper';
|
|
||||||
|
|
||||||
export type ComponentRenderer =
|
export type ComponentRenderer =
|
||||||
| ComponentInstance['default']
|
| ComponentInstance['default']
|
||||||
|
@ -28,7 +27,7 @@ export function createAstroNode(
|
||||||
components: Record<string, ComponentRenderer> = {}
|
components: Record<string, ComponentRenderer> = {}
|
||||||
): AstroNode {
|
): AstroNode {
|
||||||
if (typeof node === 'string' || typeof node === 'number') {
|
if (typeof node === 'string' || typeof node === 'number') {
|
||||||
return escape(String(node));
|
return String(node);
|
||||||
} else if (node === null || typeof node !== 'object' || !Markdoc.Tag.isTag(node)) {
|
} else if (node === null || typeof node !== 'object' || !Markdoc.Tag.isTag(node)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue