Skip to content

Commit a136caf

Browse files
author
Tobias Brennecke
committed
Fixes #582 Changing the pattern markdown should rebuilt the pattern
1 parent a1b4f12 commit a136caf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/lib/pattern_assembler.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ var path = require('path'),
1515
ch = require('./changes_hunter'),
1616
JSON5 = require('json5');
1717

18-
var markdown_parser = new mp();
19-
var changes_hunter = new ch();
18+
const markdown_parser = new mp();
19+
const changes_hunter = new ch();
2020

2121
var pattern_assembler = function () {
2222
// HELPER FUNCTIONS
@@ -155,6 +155,8 @@ var pattern_assembler = function () {
155155

156156
try {
157157
var markdownFileName = path.resolve(patternlab.config.paths.source.patterns, currentPattern.subdir, currentPattern.fileName + ".md");
158+
changes_hunter.checkLastModified(currentPattern, markdownFileName);
159+
158160
var markdownFileContents = fs.readFileSync(markdownFileName, 'utf8');
159161

160162
var markdownObject = markdown_parser.parse(markdownFileContents);

0 commit comments

Comments
 (0)