Skip to content

Commit

Permalink
fix: allow umlauts and , in variable label (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
benib authored Apr 16, 2024
1 parent f7a11ca commit 62b6756
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/Paragraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class Paragraph {
}
}

const variableRegExp = /\{(?<type>string|number|tel|email|date)?(?::)?(?<name>[a-zA-Z]{1,})(?::)?(?<label>[a-zA-Z-. ]{0,})\}/g;
const variableRegExp = /\{(?<type>string|number|tel|email|date)?(?::)?(?<name>[a-zA-Z]{1,})(?::)?(?<label>[^:}]{0,})\}/g;
function getVariablesFromString(string) {
const matches = [...string.matchAll(variableRegExp)]
return matches
Expand Down

0 comments on commit 62b6756

Please sign in to comment.