diff --git a/README.md b/README.md index a81dade..0cb9a7e 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ import {render} from '@croct/md-lite'; const markdown = '**Hello**, [World](https://example.com)'; const html = render(markdown, { + fragment: node => node.children.join(''), text: node => node.content, bold: node => `${node.children}`, italic: node => `${node.children}`, @@ -91,7 +92,6 @@ const html = render(markdown, { link: node => `${node.children}`, image: node => `${node.alt}`, paragraph: node => `

${node.children.join('')}

`, - fragment: node => node.children.join(''), }); ``` @@ -104,6 +104,7 @@ import {render} from '@croct/md-lite'; const markdown = '**Hello**, [World](https://example.com)'; const jsx = render(markdown, { + fragment: node => node.children, text: node => node.content, bold: node => {node.children}, italic: node => {node.children}, @@ -112,7 +113,6 @@ const jsx = render(markdown, { link: node => {node.children}, image: node => {node.alt}, paragraph: node =>

{node.children}

, - fragment: node => node.children.map(child => {child}), }); ```