Skip to content

Commit ed7c68f

Browse files
committed
fix hash issue
Signed-off-by: shmck <[email protected]>
1 parent 1a7b47c commit ed7c68f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/utils/parse.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export function parseMdContent (md: string): TutorialFrame | never {
2222

2323
const lines = md.split('\n')
2424

25-
// Split the multiple parts - This way enables the creator to use 4/5 level headers inside the content.
25+
// Split the header based sections
2626
lines.forEach((line, index) => {
27-
if (line.match(/#{1,3}\s/) || index === lines.length - 1) {
27+
if (line.match(/^#{1,5}\s/) || index === lines.length - 1) {
2828
if (start !== -1) {
2929
parts.push(lines.slice(start, index).join('\n'))
3030
start = index
@@ -44,6 +44,7 @@ export function parseMdContent (md: string): TutorialFrame | never {
4444

4545
// Capture summary
4646
const summaryMatch = parts.shift().match(R.summary)
47+
4748
if (summaryMatch.groups.tutorialTitle) {
4849
mdContent.summary.title = summaryMatch.groups.tutorialTitle.trim()
4950
}
@@ -57,7 +58,6 @@ export function parseMdContent (md: string): TutorialFrame | never {
5758
parts.forEach((section: string) => {
5859
// match level
5960
const levelMatch: RegExpMatchArray | null = section.match(R.level)
60-
6161
if (levelMatch && levelMatch.groups) {
6262
const levelId = levelMatch.groups.levelId.replace('.', '')
6363
current = {

0 commit comments

Comments
 (0)