Skip to content

Commit

Permalink
fix: Fix multi character suggest (#1620)
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviouk authored Jul 26, 2021
1 parent 45faa1f commit 83a53c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/suggestion/src/findSuggestionMatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 83a53c1

Please sign in to comment.