Skip to content

Commit 784ba9d

Browse files
authored
Merge pull request #1143 from JosefBredereck/dev
Update pattern discovery and fix "view all" issues
2 parents 831c8b0 + 243eef0 commit 784ba9d

File tree

27 files changed

+942
-510
lines changed

27 files changed

+942
-510
lines changed

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"singleQuote": true,
3-
"trailingComma": "es5"
3+
"trailingComma": "es5",
4+
"endOfLine": "auto"
45
}

packages/cli/test/fixtures/patternlab-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"patternExportDirectory": "./pattern_exports/",
7474
"patternExportPatternPartials": [],
7575
"patternMergeVariantArrays": true,
76+
"renderFlatPatternsOnViewAllPages": false,
7677
"serverOptions": {
7778
"wait": 1000
7879
},

packages/core/patternlab-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"patternExportPreserveDirectoryStructure": true,
7777
"patternExportRaw": false,
7878
"patternMergeVariantArrays": true,
79+
"renderFlatPatternsOnViewAllPages": false,
7980
"serverOptions": {
8081
"wait": 1000
8182
},

packages/core/src/lib/markdown_parser.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ const markdown_parser = function() {
1313
let returnObject = {};
1414

1515
try {
16-
//for each block process the yaml frontmatter and markdown
17-
const frontmatterRE = /---\r?\n{1}([\s\S]*)---\r?\n{1}([\s\S]*)+/gm;
16+
// for each block process the yaml frontmatter and markdown
17+
// even if the pattern only has pattern data without further documentation
18+
const frontmatterRE = /---\r?\n{1}([\s\S]*)---([\s\S]*)+/gm;
1819
const chunks = frontmatterRE.exec(block);
1920

2021
if (chunks) {

0 commit comments

Comments
 (0)