mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-05 22:36:23 +01:00
More flexible placeholder match
This commit is contained in:
1 parent
082be6e1dd
commit
a3988188f3
1 file changed
+1
-1
@@ -36,7 +36,7 @@ class PlaceholderWidget extends WidgetType {
|
|||||||
|
|
||||||
export const placeholders = function (variables: { name: string }[]) {
|
export const placeholders = function (variables: { name: string }[]) {
|
||||||
const placeholderMatcher = new BetterMatchDecorator({
|
const placeholderMatcher = new BetterMatchDecorator({
|
||||||
regexp: /\$\{\[\s*([^\]\s]+)\s*]}/g,
|
regexp: /\$\{\[\s*([^\]]+)\s*]}/g,
|
||||||
decoration(match, view, matchStartPos) {
|
decoration(match, view, matchStartPos) {
|
||||||
const matchEndPos = matchStartPos + match[0].length - 1;
|
const matchEndPos = matchStartPos + match[0].length - 1;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user