Skip to content

Commit 543267b

Browse files
committed
warn when we cannot find a pattern
tighted up the regex for link parsing
1 parent 92aeca9 commit 543267b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/lib/pattern_assembler.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ var pattern_assembler = function () {
4545
return patternlab.patterns[i];
4646
}
4747
}
48-
if (patternlab.config.debug) {
49-
console.error('Could not find pattern with partial ' + partialName);
50-
}
48+
plutils.logOrange('Could not find pattern referenced with partial synxtax "' + partialName + '". This can occur when a pattern was renamed, moved, or no longer exists but it still called within a different template somewhere.')
5149
return undefined;
5250
}
5351

@@ -443,7 +441,7 @@ var pattern_assembler = function () {
443441
var linkRE, dataObjAsString, linkMatches;
444442

445443
//check for link.patternPartial
446-
linkRE = /link\.[A-z0-9-_]+/g;
444+
linkRE = /link\.[A-z0-9-_]+(?!.)/g;
447445

448446
//stringify the passed in object
449447
dataObjAsString = JSON5.stringify(obj);

0 commit comments

Comments
 (0)