[FIX] Empty message if contains only a link (#787)
* Fix empty message if contains only a link
* 🐛 Fix empty space
This commit is contained in:
parent
013c151c10
commit
d017348dfe
|
@ -57,8 +57,10 @@ 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();
|
||||
}
|
||||
if (numberOfLines > 0) {
|
||||
m = m.replace(/[\n]+/g, '\n').trim();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue