@@ -36,6 +36,10 @@ const validHeadings = [
36
36
"##### Heading 5" ,
37
37
"###### Heading 6" ,
38
38
39
+ // 1.1 ATX heading-like text
40
+ "####### Heading 7 (not a valid heading)" ,
41
+ "#######Heading 7 (not a valid heading)" ,
42
+
39
43
// 2. Document with multiple headings
40
44
dedent `# Heading 1
41
45
@@ -45,6 +49,7 @@ const validHeadings = [
45
49
46
50
// 3. Variations on spacing
47
51
"# Heading with extra space" ,
52
+ "#\tHeading with tab" ,
48
53
49
54
// 4. Standalone hash
50
55
"#" ,
@@ -66,22 +71,23 @@ const validHeadings = [
66
71
"```" ,
67
72
68
73
// 7.3 Code blocks with language identifiers
69
- "``` followed by text" ,
70
- "~~~ followed by more text" ,
74
+ "``` # followed # by text" ,
75
+ "~~~ # followed # by more text" ,
71
76
72
77
// 7.4 Code block after paragraph
73
78
dedent `This is a paragraph followed by code.
74
79
75
- \`\`\`
76
- #This is in a code block
77
- \`\`\`` ,
80
+ \`\`\`
81
+ #This is in a code block
82
+ \`\`\``,
78
83
79
84
// 8. Inline code with hash symbols
80
85
"This paragraph has `#inline-code` which is not a heading" ,
81
86
"Here's a code span with a hash: `const tag = '#heading'`" ,
82
87
83
88
// 9. Markdown links with hash in URLs
84
89
"[#370](https://github.com/eslint/markdown/issues/370)" ,
90
+ "" ,
85
91
86
92
// 10. HTML headings (not ATX-style)
87
93
"<h1>Heading 1</h1>" ,
@@ -91,6 +97,7 @@ const validHeadings = [
91
97
"<h5>Heading 5</h5>" ,
92
98
"<h6>Heading 6</h6>" ,
93
99
"<h1>#valid heading</h1>" ,
100
+ "<!-- #valid heading -->" ,
94
101
95
102
// 11. Content inside single quotes and double quotes
96
103
`'#something'` ,
@@ -296,11 +303,11 @@ const invalidTests = [
296
303
// 5.1 With code markers in context
297
304
{
298
305
code : dedent `Text before
299
- #Heading with \`\`\` code markers
300
- Text after` ,
306
+ #Heading with \`\`\` code markers
307
+ Text after`,
301
308
output : dedent `Text before
302
- # Heading with \`\`\` code markers
303
- Text after` ,
309
+ # Heading with \`\`\` code markers
310
+ Text after`,
304
311
errors : [
305
312
{
306
313
messageId : "missingSpace" ,
0 commit comments