[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:
parent
d017348dfe
commit
8931118032
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue