mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-18 14:59:42 +02:00
More flexible placeholder match
This commit is contained in:
@@ -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