@@ -299,7 +299,7 @@ The first step
299299text :md ,
300300 skeleton,
301301commits :{
302- "1.1Q " :[ "abcdefg1" ] ,
302+ "1.1:T " :[ "abcdefg1" ] ,
303303} ,
304304} ) ;
305305const expected = {
@@ -355,7 +355,7 @@ The first step
355355text :md ,
356356 skeleton,
357357commits :{
358- "1.1Q " :[ "abcdefg1" , "123456789" ] ,
358+ "1.1:T " :[ "abcdefg1" , "123456789" ] ,
359359} ,
360360} ) ;
361361const expected = {
@@ -465,7 +465,7 @@ Another line
465465 skeleton,
466466commits :{
467467"1" :[ "abcdefg1" ] ,
468- "1.1Q " :[ "12345678" ] ,
468+ "1.1:T " :[ "12345678" ] ,
469469} ,
470470} ) ;
471471const expected = {
@@ -519,8 +519,8 @@ The first step
519519text :md ,
520520 skeleton,
521521commits :{
522- "1.1Q " :[ "abcdefg1" , "123456789" ] ,
523- "1.1A " :[ "1gfedcba" , "987654321" ] ,
522+ "1.1:T " :[ "abcdefg1" , "123456789" ] ,
523+ "1.1:S " :[ "1gfedcba" , "987654321" ] ,
524524} ,
525525} ) ;
526526const expected = {
@@ -644,12 +644,12 @@ The third step
644644text :md ,
645645 skeleton,
646646commits :{
647- "1.1Q " :[ "abcdef1" , "123456789" ] ,
648- "1.1A " :[ "1fedcba" , "987654321" ] ,
649- "1.2Q " :[ "2abcdef" ] ,
650- "1.2A " :[ "3abcdef" ] ,
651- "2.1Q " :[ "4abcdef" ] ,
652- "2.1A " :[ "5abcdef" ] ,
647+ "1.1:T " :[ "abcdef1" , "123456789" ] ,
648+ "1.1:S " :[ "1fedcba" , "987654321" ] ,
649+ "1.2:T " :[ "2abcdef" ] ,
650+ "1.2:S " :[ "3abcdef" ] ,
651+ "2.1:T " :[ "4abcdef" ] ,
652+ "2.1:S " :[ "5abcdef" ] ,
653653} ,
654654} ) ;
655655const expected = {
@@ -759,7 +759,7 @@ The first step
759759text :md ,
760760 skeleton,
761761commits :{
762- "1.1Q " :[ "abcdef1" , "123456789" ] ,
762+ "1.1:T " :[ "abcdef1" , "123456789" ] ,
763763} ,
764764} ) ;
765765const expected = {
@@ -936,7 +936,7 @@ Description.
936936} ) ;
937937
938938describe ( "hints" , ( ) => {
939- it ( "should parse hints for a step" , ( ) => {
939+ it ( "should parse hints for a step with '* " , ( ) => {
940940const md = `# Title
941941
942942Description.
@@ -971,7 +971,71 @@ The first step
971971text :md ,
972972 skeleton,
973973commits :{
974- "1.1Q" :[ "abcdef1" , "123456789" ] ,
974+ "1.1:T" :[ "abcdef1" , "123456789" ] ,
975+ } ,
976+ } ) ;
977+ const expected = {
978+ summary :{
979+ description :"Description." ,
980+ } ,
981+ levels :[
982+ {
983+ id :"1" ,
984+ title :"Title 1" ,
985+ summary :"First level content." ,
986+ content :"First level content." ,
987+ steps :[
988+ {
989+ id :"1.1" ,
990+ content :"The first step" ,
991+ setup :{
992+ commits :[ "abcdef1" , "123456789" ] ,
993+ } ,
994+ hints :[ "First Hint" , "Second Hint" ] ,
995+ } ,
996+ ] ,
997+ } ,
998+ ] ,
999+ } ;
1000+ expect ( result . levels ) . toEqual ( expected . levels ) ;
1001+ } ) ;
1002+
1003+ xit ( "should parse hints for a step with '-'" , ( ) => {
1004+ const md = `# Title
1005+
1006+ Description.
1007+
1008+ ## 1. Title 1
1009+
1010+ First level content.
1011+
1012+ ### 1.1
1013+
1014+ The first step
1015+
1016+ #### HINTS
1017+
1018+ - First Hint
1019+ - Second Hint
1020+
1021+ ` ;
1022+ const skeleton = {
1023+ levels :[
1024+ {
1025+ id :"1" ,
1026+ steps :[
1027+ {
1028+ id :"1.1" ,
1029+ } ,
1030+ ] ,
1031+ } ,
1032+ ] ,
1033+ } ;
1034+ const result = parse ( {
1035+ text :md ,
1036+ skeleton,
1037+ commits :{
1038+ "1.1:T" :[ "abcdef1" , "123456789" ] ,
9751039} ,
9761040} ) ;
9771041const expected = {
@@ -1040,7 +1104,7 @@ And spans multiple lines.
10401104text :md ,
10411105 skeleton,
10421106commits :{
1043- "1.1Q " :[ "abcdef1" , "123456789" ] ,
1107+ "1.1:T " :[ "abcdef1" , "123456789" ] ,
10441108} ,
10451109} ) ;
10461110const expected = {
@@ -1119,9 +1183,9 @@ The second uninterrupted step
11191183text :md ,
11201184 skeleton,
11211185commits :{
1122- "1.1Q " :[ "abcdef1" ] ,
1123- "1.1A " :[ "123456789" ] ,
1124- "1.2Q " :[ "fedcba1" ] ,
1186+ "1.1:T " :[ "abcdef1" ] ,
1187+ "1.1:S " :[ "123456789" ] ,
1188+ "1.2:T " :[ "fedcba1" ] ,
11251189} ,
11261190} ) ;
11271191const expected = {