Skip to content

Commit 5e90b80

Browse files
committed
fix and cover pseudo-pattern 404s
closes #458
1 parent f340339 commit 5e90b80

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

core/lib/pseudopattern_hunter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var pseudopattern_hunter = function () {
5454

5555
// use the same template engine as the non-variant
5656
engine: currentPattern.engine
57-
});
57+
}, patternlab);
5858

5959
//process the companion markdown file if it exists
6060
pattern_assembler.parse_pattern_markdown(patternVariant, patternlab);

test/pseudopattern_hunter_tests.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

3+
var path = require('path');
34
var pha = require('../core/lib/pseudopattern_hunter');
45
var pa = require('../core/lib/pattern_assembler');
56
var Pattern = require('../core/lib/object_factory').Pattern;
@@ -44,6 +45,7 @@ exports['pseudopattern_hunter'] = {
4445
test.equals(pl.patterns[1].patternPartial, 'test-styled-atom-alt');
4546
test.equals(pl.patterns[1].extendedTemplate.replace(/\s\s+/g, ' ').replace(/\n/g, ' ').trim(), '<span class="test_base {{styleModifier}}"> {{message}} </span>');
4647
test.equals(JSON.stringify(pl.patterns[1].jsonFileData), JSON.stringify({"message": "alternateMessage"}));
48+
test.equals(pl.patterns[1].patternLink, '00-test-03-styled-atom-alt' + path.sep + '00-test-03-styled-atom-alt.html');
4749

4850
test.done();
4951
}

0 commit comments

Comments
 (0)