Skip to content

Commit d810ba9

Browse files
committed
Make the level summary optional
1 parent 92c534f commit d810ba9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function parseContent(md) {
3939

4040
// Identify each part of the content
4141
parts.forEach(section => {
42-
const levelRegex = /^(##\s(?<levelId>L\d+)\s(?<levelTitle>.*)\n*>\s+(?<levelSummary>.*)\n+(?<levelContent>[^]*))/;
42+
const levelRegex = /^(##\s(?<levelId>L\d+)\s(?<levelTitle>.*)\n*(>\s*(?<levelSummary>.*))?\n+(?<levelContent>[^]*))/;
4343
const stepRegex = /^(###\s(?<stepId>(?<levelId>L\d+)S\d+)\s(?<stepTitle>.*)\n+(?<stepContent>[^]*))/;
4444

4545
const levelMatch = section.match(levelRegex);
@@ -149,7 +149,6 @@ async function build({ repo, codeBranch, setupBranch, isLocal }) {
149149
const isRepo = await gitTest.checkIsRepo();
150150

151151
if (isRepo) {
152-
// Add the new one as a submodule
153152
const startCleanup = cleanupFiles(workingDir);
154153

155154
if (startCleanup) {

0 commit comments

Comments
 (0)