[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) {
|
if (m) {
|
||||||
m = emojify(m, { output: 'unicode' });
|
m = emojify(m, { output: 'unicode' });
|
||||||
}
|
}
|
||||||
const matched = m.match(/^\[([^\]]*)\]\(([^)]*)\)\1/);
|
m = m.replace(/^\[([^\]]*)\]\(([^)]*)\)\s/, '').trim();
|
||||||
if (matched && matched[0] !== msg) {
|
|
||||||
m = m.replace(/^\[([^\]]*)\]\(([^)]*)\)/, '').trim();
|
|
||||||
}
|
|
||||||
if (numberOfLines > 0) {
|
if (numberOfLines > 0) {
|
||||||
m = m.replace(/[\n]+/g, '\n').trim();
|
m = m.replace(/[\n]+/g, '\n').trim();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue