diff --git a/src/asciidoc/templates/Example.tsx b/src/asciidoc/templates/Example.tsx index e6e2437..f5a0897 100644 --- a/src/asciidoc/templates/Example.tsx +++ b/src/asciidoc/templates/Example.tsx @@ -20,6 +20,7 @@ const Example = ({ node }: { node: Block }) => { > {parse(title)}
+ {node.content && parse(node.content)}
@@ -34,6 +35,7 @@ const Example = ({ node }: { node: Block }) => { > <div className="content"> + {node.content && parse(node.content)} <Content blocks={node.blocks} /> </div> </div> diff --git a/src/asciidoc/templates/Open.tsx b/src/asciidoc/templates/Open.tsx index aebc8a1..17017f3 100644 --- a/src/asciidoc/templates/Open.tsx +++ b/src/asciidoc/templates/Open.tsx @@ -1,4 +1,5 @@ import cn from 'classnames' +import parse from 'html-react-parser' import { Content } from '../' import { type BaseBlock } from '../utils/prepareDocument' @@ -15,6 +16,7 @@ const Open = ({ node }: { node: BaseBlock }) => { > <Title text={node.title} /> <blockquote className="content"> + {node.content && parse(node.content)} <Content blocks={node.blocks} /> </blockquote> </div> @@ -28,6 +30,7 @@ const Open = ({ node }: { node: BaseBlock }) => { > <Title text={node.title} /> <div className="content"> + {node.content && parse(node.content)} <Content blocks={node.blocks} /> </div> </div> diff --git a/src/asciidoc/templates/Sidebar.tsx b/src/asciidoc/templates/Sidebar.tsx index 959c112..e9c7c01 100644 --- a/src/asciidoc/templates/Sidebar.tsx +++ b/src/asciidoc/templates/Sidebar.tsx @@ -1,4 +1,5 @@ import cn from 'classnames' +import parse from 'html-react-parser' import { Content } from '../' import { type Block } from '../utils/prepareDocument' @@ -11,6 +12,7 @@ const Sidebar = ({ node }: { node: Block }) => ( > <div className="content"> <Title text={node.title} /> + {node.content && parse(node.content)} <Content blocks={node.blocks} /> </div> </div> diff --git a/src/examples/sidebar.js b/src/examples/sidebar.js index 0078ce4..8d79d4f 100644 --- a/src/examples/sidebar.js +++ b/src/examples/sidebar.js @@ -21,6 +21,11 @@ AsciiDoc was first released in Nov 2002 by Stuart Rackham. It was designed from the start to be a shorthand syntax for producing professional documents like DocBook and LaTeX. **** + +[sidebar] +AsciiDoc was first released in Nov 2002 by Stuart Rackham. +It was designed from the start to be a shorthand syntax +for producing professional documents like DocBook and LaTeX. ` export default sidebar