Skip to content

Commit

Permalink
Allowing Pattern State to be set in MD files front matter. Just like …
Browse files Browse the repository at this point in the history
…node versions. (#134)
  • Loading branch information
EvanLovely committed Oct 10, 2017
1 parent 8f66d4f commit 064a050
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/PatternLab/PatternData/Rules/DocumentationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ public function run($depth, $ext, $path, $pathName, $name) {
if (isset($title)) {
$patternStoreData["nameClean"] = $title;
}


if (isset($yaml["state"])) {
$patternStoreData["state"] = $yaml["state"];
}

// if the pattern data store already exists make sure this data overwrites it
$patternStoreData = (PatternData::checkOption($patternStoreKey)) ? array_replace_recursive(PatternData::getOption($patternStoreKey),$patternStoreData) : $patternStoreData;
PatternData::setOption($patternStoreKey, $patternStoreData);
Expand Down

0 comments on commit 064a050

Please sign in to comment.