Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commited7c68f

Browse files
committed
fix hash issue
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent1a7b47c commited7c68f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/utils/parse.ts

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

2323
constlines=md.split('\n')
2424

25-
// Split themultiple parts - This way enables the creator to use 4/5 level headers inside the content.
25+
// Split theheader 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
constsummaryMatch=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
constlevelMatch:RegExpMatchArray|null=section.match(R.level)
60-
6161
if(levelMatch&&levelMatch.groups){
6262
constlevelId=levelMatch.groups.levelId.replace('.','')
6363
current={

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp