fix(editor): Allow special chars in node selector completion (#5196)

🐛 Widen regex
This commit is contained in:
Iván Ovejero 2023-01-19 09:42:00 +01:00 committed by GitHub
parent a89c9c68d1
commit b718464b1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,7 @@ export const itemIndexCompletions = (Vue as CodeNodeEditorMixin).extend({
selectorCompletions(context: CompletionContext, matcher: string | null = null) { selectorCompletions(context: CompletionContext, matcher: string | null = null) {
const pattern = const pattern =
matcher === null matcher === null
? /\$\((?<quotedNodeName>['"][\w\s]+['"])\)\..*/ // $('nodeName'). ? /\$\((?<quotedNodeName>['"][\S\s]+['"])\)\..*/ // $('nodeName').
: new RegExp(`${matcher}\..*`); : new RegExp(`${matcher}\..*`);
const preCursor = context.matchBefore(pattern); const preCursor = context.matchBefore(pattern);