Browse Source

Update Common.js

dev
panda2134 5 years ago committed by GitHub
parent
commit
9e98af3660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/Common.js

4
src/Common.js

@ -136,14 +136,14 @@ export class HighlightedMarkdown extends Component {
return (
<>
{props.author}
{parser.parseWithInstructions(renderedMarkdown, node => node.type !== 'script', processInstructions)}
{parser.parseWithInstructions(renderedMarkdown, node => node.type !== 'script', processInstructions) || ''}
</>
)
} else {
let rawMd = props.text
if (props.author) rawMd = props.author + ' ' + rawMd
const renderedMarkdown = renderMd(rawMd)
return parser.parseWithInstructions(renderedMarkdown, node => node.type !== 'script', processInstructions)
return (parser.parseWithInstructions(renderedMarkdown, node => node.type !== 'script', processInstructions) || null)
}
}
}

Loading…
Cancel
Save