File tree 1 file changed +47
-0
lines changed
1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -971,6 +971,53 @@ The third step
971
971
expect ( result . levels ) . toEqual ( expected . levels )
972
972
} )
973
973
974
+ it ( 'should load content with #' , ( ) => {
975
+ // https://github.com/coderoad/coderoad-vscode/issues/479
976
+
977
+ const md = `# Title
978
+
979
+ Description line with # content and #content and ## content
980
+
981
+ ## 1. Title
982
+
983
+ First line with # content and #content and ## content
984
+
985
+ ### 1.1
986
+
987
+ Content line with # content and #content and ## content`
988
+ const skeleton = {
989
+ levels : [
990
+ {
991
+ id : '1'
992
+ }
993
+ ]
994
+ }
995
+ const result = parse ( {
996
+ text : md ,
997
+ skeleton,
998
+ commits : {
999
+ '1' : [ 'abcdefg1' ]
1000
+ }
1001
+ } )
1002
+ const expected = {
1003
+ summary : {
1004
+ description :
1005
+ 'Description line with # content and #content and ## content'
1006
+ } ,
1007
+ levels : [
1008
+ {
1009
+ id : '1' ,
1010
+ summary : 'First line with # content and #content and ## content' ,
1011
+ content : 'Content line with # content and #content and ## content' ,
1012
+ setup : {
1013
+ commits : [ 'abcdefg1' ]
1014
+ }
1015
+ }
1016
+ ]
1017
+ }
1018
+ expect ( result . levels [ 0 ] . setup ) . toEqual ( expected . levels [ 0 ] . setup )
1019
+ } )
1020
+
974
1021
describe ( 'config' , ( ) => {
975
1022
it ( 'should parse the tutorial config' , ( ) => {
976
1023
const md = `# Title
You can’t perform that action at this time.
0 commit comments