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

Commit1a7b47c

Browse files
committed
setup test for content with a #
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent869c604 commit1a7b47c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

‎tests/parse.test.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,53 @@ The third step
971971
expect(result.levels).toEqual(expected.levels)
972972
})
973973

974+
it('should load content with #',()=>{
975+
// https://github.com/coderoad/coderoad-vscode/issues/479
976+
977+
constmd=`# 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+
constskeleton={
989+
levels:[
990+
{
991+
id:'1'
992+
}
993+
]
994+
}
995+
constresult=parse({
996+
text:md,
997+
skeleton,
998+
commits:{
999+
'1':['abcdefg1']
1000+
}
1001+
})
1002+
constexpected={
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+
9741021
describe('config',()=>{
9751022
it('should parse the tutorial config',()=>{
9761023
constmd=`# Title

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp