@@ -22,9 +22,9 @@ export function parseMdContent (md: string): TutorialFrame | never {
2222
2323const lines = 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
2626lines . 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 ) {
2828if ( start !== - 1 ) {
2929parts . push ( lines . slice ( start , index ) . join ( '\n' ) )
3030start = index
@@ -44,6 +44,7 @@ export function parseMdContent (md: string): TutorialFrame | never {
4444
4545// Capture summary
4646const summaryMatch = parts . shift ( ) . match ( R . summary )
47+
4748if ( summaryMatch . groups . tutorialTitle ) {
4849mdContent . summary . title = summaryMatch . groups . tutorialTitle . trim ( )
4950}
@@ -57,7 +58,6 @@ export function parseMdContent (md: string): TutorialFrame | never {
5758parts . forEach ( ( section :string ) => {
5859// match level
5960const levelMatch :RegExpMatchArray | null = section . match ( R . level )
60-
6161if ( levelMatch && levelMatch . groups ) {
6262const levelId = levelMatch . groups . levelId . replace ( '.' , '' )
6363current = {