diff --git a/app/containers/message/Markdown.js b/app/containers/message/Markdown.js index bb6ab1e6..328eaae1 100644 --- a/app/containers/message/Markdown.js +++ b/app/containers/message/Markdown.js @@ -29,7 +29,7 @@ const BlockCode = ({ node, state }) => ( const rules = { username: { order: -1, - match: SimpleMarkdown.inlineRegex(/@[0-9a-zA-Z-_.]+/), + match: SimpleMarkdown.inlineRegex(/^@[0-9a-zA-Z-_.]+/), parse: capture => ({ content: capture[0] }), react: (node, output, state) => ({ type: 'custom', @@ -49,7 +49,7 @@ const rules = { }, heading: { order: -2, - match: SimpleMarkdown.inlineRegex(/#[0-9a-zA-Z-_.]+/), + match: SimpleMarkdown.inlineRegex(/^#[0-9a-zA-Z-_.]+/), parse: capture => ({ content: capture[0] }), react: (node, output, state) => ({ type: 'custom',