Skip to content

Commit

Permalink
fix: remove unneeded html-escaper
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev committed Feb 16, 2023
1 parent fb79194 commit f44b57f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/integrations/markdoc/components/astroNode.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { ComponentInstance } from 'astro';
import type { RenderableTreeNode, Tag } from '@markdoc/markdoc';
import Markdoc from '@markdoc/markdoc';
import { escape } from 'html-escaper';

export type ComponentRenderer =
| ComponentInstance['default']
Expand All @@ -28,7 +27,7 @@ export function createAstroNode(
components: Record<string, ComponentRenderer> = {}
): AstroNode {
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)) {
return '';
}
Expand Down

0 comments on commit f44b57f

Please sign in to comment.