Come up with working regex replacement for special tags.

This commit is contained in:
Dorian 2019-05-01 10:17:28 -04:00
parent 65f563356c
commit edf00ed0da
1 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,9 @@ export class MarkdownBlock extends Component {
return highlighter.highlightAuto(code_).value;
}
});
let rawMarkup = md.render(this.props.content || '');
let markdownContent = this.props.content || '';
markdownContent = markdownContent.replace(new RegExp('\\[:greeting:]\\[name=(.*)]'), '<x-greeting name=$1 />');
let rawMarkup = md.render(markdownContent);
return (
<span