File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,13 @@ export function parseMdContent(md: string): TutorialFrame | never {
41
41
const summaryMatch = parts
42
42
. shift ( )
43
43
. match ( / ^ # \s (?< tutorialTitle > .* ) [ \n \r ] + (?< tutorialDescription > [ ^ ] * ) / ) ;
44
- if ( ! summaryMatch . groups . tutorialTitle ) {
45
- throw new Error ( "Missing tutorial title" ) ;
44
+ if ( summaryMatch . groups . tutorialTitle ) {
45
+ mdContent . summary . title = summaryMatch . groups . tutorialTitle . trim ( ) ;
46
46
}
47
- mdContent . summary . title = summaryMatch . groups . tutorialTitle . trim ( ) ;
48
47
49
- if ( ! summaryMatch . groups . tutorialDescription ) {
50
- throw new Error ( "Missing tutorial summary description" ) ;
48
+ if ( summaryMatch . groups . tutorialDescription ) {
49
+ mdContent . summary . description = summaryMatch . groups . tutorialDescription . trim ( ) ;
51
50
}
52
- mdContent . summary . description = summaryMatch . groups . tutorialDescription . trim ( ) ;
53
51
54
52
// Identify each part of the content
55
53
parts . forEach ( ( section : string ) => {
You can’t perform that action at this time.
0 commit comments