mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-28 22:50:19 +00:00
fix: 修复行前缀检测逻辑,确保正确判断空行
This commit is contained in:
parent
3b3ffd494f
commit
862acd0776
@ -2766,8 +2766,10 @@ export default {
|
||||
}
|
||||
const prefixText = editor.getText(0, mentionCharPos) || '';
|
||||
const lastBreak = Math.max(prefixText.lastIndexOf("\n"), prefixText.lastIndexOf("\r"));
|
||||
const linePrefix = lastBreak >= 0 ? prefixText.slice(lastBreak + 1) : prefixText;
|
||||
return linePrefix.trim().length === 0;
|
||||
if (lastBreak >= 0) {
|
||||
return false;
|
||||
}
|
||||
return prefixText.trim().length === 0;
|
||||
},
|
||||
|
||||
getMoreUser(key, existIds) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user