diff --git a/src/view/NodeRenderer.tsx b/src/view/NodeRenderer.tsx index 21a1155..ff22a94 100644 --- a/src/view/NodeRenderer.tsx +++ b/src/view/NodeRenderer.tsx @@ -77,14 +77,20 @@ export const NodeRenderer = (props: { tokens: Token[] }) => { } if (token.type == "image") { - return + return <> + + + } if (token.type == "code_inline") { - return {token.content} + return <> + {token.content} + + } - // if (!token.type.includes("_close")) console.log("tokens not rendered: ", tokens) + if (!token.type.includes("_close")) console.log("tokens not rendered: ", tokens) return } diff --git a/tests/view/noderenderer.test.tsx b/tests/view/noderenderer.test.tsx index ea78849..bea840d 100644 --- a/tests/view/noderenderer.test.tsx +++ b/tests/view/noderenderer.test.tsx @@ -41,6 +41,12 @@ describe('NodeRenderer', () => { expect(screen.getByText('snippet')).toBeInTheDocument(); }); + it('renders tags', () => { + renderMarkdown("test #tag") + + expect(screen.getByText('test #tag')).toBeInTheDocument(); + }); + it('renders inline tokens', () => { renderMarkdown("Hello");