Skip to content

Commit c2f5d90

Browse files
committed
only setting $title variable if present in md description
1 parent 16d5f4d commit c2f5d90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PatternLab/PatternData/Rules/DocumentationRule.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,14 @@ public function run($depth, $ext, $path, $pathName, $name) {
8181
$patternStoreKey = ($patternSubtypeDoc) ? $docPartial."-plsubtype" : $docPartial;
8282

8383
$patternStoreData = array("category" => $category,
84-
"nameClean" => $title,
8584
"desc" => $markdown,
8685
"descExists" => true,
8786
"meta" => $yaml,
8887
"full" => $doc);
88+
89+
if (isset($title)) {
90+
$patternStoreData["nameClean"] = $title;
91+
}
8992

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

0 commit comments

Comments
 (0)