[IMPROVEMENT] Refactor empty space regex on quote (#1017)

* 🎨 Improve regex to empty space on quote

* 🎨 Improve on regex to empty space on quote
This commit is contained in:
Djorkaeff Alexandre 2019-06-28 09:33:39 -03:00 committed by Diego Mello
parent d017348dfe
commit 8931118032
1 changed files with 1 additions and 4 deletions

View File

@ -57,10 +57,7 @@ const Markdown = React.memo(({
if (m) {
m = emojify(m, { output: 'unicode' });
}
const matched = m.match(/^\[([^\]]*)\]\(([^)]*)\)\1/);
if (matched && matched[0] !== msg) {
m = m.replace(/^\[([^\]]*)\]\(([^)]*)\)/, '').trim();
}
m = m.replace(/^\[([^\]]*)\]\(([^)]*)\)\s/, '').trim();
if (numberOfLines > 0) {
m = m.replace(/[\n]+/g, '\n').trim();
}