Skip to content

Commit 9639f00

Browse files
committed
attempt to fix link.pattern parsing inside json
was doing more, but had some trouble normalizing using path.sep - will try that again #409
1 parent bec84f1 commit 9639f00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/lib/pattern_assembler.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ var pattern_assembler = function () {
9191
function addPattern(pattern, patternlab) {
9292

9393
//add the link to the global object
94-
patternlab.data.link[pattern.patternGroup + '-' + pattern.patternBaseName] = '/patterns/' + pattern.patternLink;
94+
patternlab.data.link[pattern.patternPartial] = '/patterns/' + pattern.patternLink;
9595

9696
//only push to array if the array doesn't contain this pattern
9797
var isNew = true;
@@ -419,6 +419,7 @@ var pattern_assembler = function () {
419419
for (var i = 0; i < linkMatches.length; i++) {
420420
expandedLink = patternlab.data.link[linkMatches[i].split('.')[1]];
421421
if (expandedLink) {
422+
expandedLink = expandedLink.replace('\\', '/');
422423
if (patternlab.config.debug) {
423424
console.log('expanded data link from ' + linkMatches[i] + ' to ' + expandedLink + ' inside ' + key);
424425
}

0 commit comments

Comments
 (0)