fix(path-map): disallow nested tokens

This commit is contained in:
Maciej Barelkowski 2021-10-04 17:50:53 +02:00 committed by Philipp Fromme
parent 03352e8665
commit c63d0984f4
1 changed files with 2 additions and 2 deletions

View File

@ -444,8 +444,8 @@ export default function PathMap() {
// helpers //////////////////////
// copied from https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js
var tokenRegex = /\{([^}]+)\}/g,
// copied and adjusted from https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js
var tokenRegex = /\{([^{}]+)\}/g,
objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g; // matches .xxxxx or ["xxxxx"] to run over object properties
function replacer(all, key, obj) {