File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/PatternLab/PatternData/Exporters Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,16 @@ public function run($type = "", $subtype = "") {
4848
4949 foreach ($ this ->store as $ patternStoreKey => $ patternStoreData ) {
5050
51+ // Docs for patternTypes (i.e. `atoms.md`), don't have these rules and need them to pass below conditionals
52+ if (
53+ !isset ($ patternStoreData ['depth ' ])
54+ && !isset ($ patternStoreData ['hidden ' ])
55+ && !isset ($ patternStoreData ['noviewall ' ])
56+ ) {
57+ $ patternStoreData ["hidden " ] = false ;
58+ $ patternStoreData ["noviewall " ] = false ;
59+ $ patternStoreData ["depth " ] = 0 ;
60+ }
5161 $ canShow = isset ($ patternStoreData ["hidden " ]) && (!$ patternStoreData ["hidden " ]) && (!$ patternStoreData ["noviewall " ]);
5262
5363 if (($ patternStoreData ["category " ] == "pattern " ) && $ canShow && ($ patternStoreData ["depth " ] > 1 ) && (!in_array ($ patternStoreData ["type " ],$ this ->styleGuideExcludes ))) {
@@ -104,7 +114,7 @@ public function run($type = "", $subtype = "") {
104114
105115 }
106116
107- } else if (($ patternStoreData ["category " ] == "pattern " ) && $ canShow &&(isset ($ patternStoreData ["full " ]) && ($ type === $ patternStoreData ["full " ] || $ type === "" ))) {
117+ } else if (($ patternStoreData ["category " ] == "pattern " ) && $ canShow && (isset ($ patternStoreData ["full " ]) && ($ type === $ patternStoreData ["full " ] || $ type === "" ))) {
108118 // This is for `patternType` docs. Given this structure:
109119 // - _patterns/
110120 // - atoms/
You can’t perform that action at this time.
0 commit comments