mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 19:59:02 +08:00
fix: Fix multi character suggest (#1620)
This commit is contained in:
parent
45faa1fc7d
commit
83a53c16db
@ -23,7 +23,10 @@ export function findSuggestionMatch(config: Trigger): SuggestionMatch {
|
||||
} = config
|
||||
|
||||
// Matching expressions used for later
|
||||
const escapedChar = `\\${char}`
|
||||
const escapedChar = char
|
||||
.split('')
|
||||
.map(c => `\\${c}`)
|
||||
.join('')
|
||||
const suffix = new RegExp(`\\s${escapedChar}$`)
|
||||
const prefix = startOfLine ? '^' : ''
|
||||
const regexp = allowSpaces
|
||||
|
Loading…
Reference in New Issue
Block a user