Skip to content

Commit cebf84f

Browse files
committed
assign extra markdown keys to extraOutput, the PL PHP mechanism (finally!)
1 parent cefce0d commit cebf84f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

core/lib/patternlab.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,13 @@ var patternlab_engine = function (config) {
388388

389389
// stringify this data for individual pattern rendering and use on the styleguide
390390
// see if patternData really needs these other duped values
391+
392+
// construct our extraOutput dump
393+
var extraOutput = Object.assign({}, pattern.extraOutput, pattern.allMarkdown);
394+
delete(extraOutput.title);
395+
delete(extraOutput.state);
396+
delete(extraOutput.markdown);
397+
391398
pattern.patternData = JSON.stringify({
392399
cssEnabled: false,
393400
patternLineageExists: pattern.patternLineageExists,
@@ -410,7 +417,7 @@ var patternlab_engine = function (config) {
410417
patternPartial: pattern.patternPartial,
411418
patternState: pattern.patternState,
412419
patternEngineName: pattern.engine.engineName,
413-
extraOutput: {}
420+
extraOutput: extraOutput
414421
});
415422

416423
//set the pattern-specific footer by compiling the general-footer with data, and then adding it to the meta footer

0 commit comments

Comments
 (0)