Skip to content

Commit 2ce6b16

Browse files
authoredSep 3, 2020
Allow for a Footnotes section at the end of an Awesome list (#118)
1 parent 8185b11 commit 2ce6b16

File tree

7 files changed

+49
-4
lines changed

7 files changed

+49
-4
lines changed
 

‎rules/toc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ const sectionHeadingBlacklist = new Set([
1616
'Contribute',
1717
'Contributing',
1818
'Licence',
19-
'License'
19+
'License',
20+
'Footnotes'
2021
]);
2122

2223
module.exports = rule('remark-lint:awesome-toc', (ast, file) => {

‎test/fixtures/toc/0.md

+8
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ non-empty
3030

3131
non-empty
3232

33+
## Contributing
34+
35+
non-empty
36+
3337
## License
3438

3539
non-empty
40+
41+
## Footnotes
42+
43+
non-empty

‎test/fixtures/toc/1.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ non-empty
3434

3535
non-empty
3636

37-
## License
37+
## Contribute
38+
39+
non-empty
40+
41+
## Licence
42+
43+
non-empty
44+
45+
## Footnotes
3846

3947
non-empty

‎test/fixtures/toc/2.md

+8
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,11 @@ non-empty
3737
## License
3838

3939
non-empty
40+
41+
## Contribute
42+
43+
non-empty
44+
45+
## Footnotes
46+
47+
non-empty

‎test/fixtures/toc/3.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ non-empty
3131

3232
non-empty
3333

34-
## License
34+
## Footnotes
35+
36+
non-empty
37+
38+
## Licence
39+
40+
non-empty
41+
42+
## Contribute
3543

3644
non-empty

‎test/fixtures/toc/4.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ non-empty
4444

4545
non-empty
4646

47-
## License
47+
## Footnotes
48+
49+
non-empty
50+
51+
## Contribute
52+
53+
non-empty
54+
55+
## Licence
4856

4957
non-empty

‎test/fixtures/toc/5.md

+4
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ This section should be ignored.
1717
## License
1818

1919
This section should be ignored.
20+
21+
## Footnotes
22+
23+
This section should be ignored.

0 commit comments

Comments
 (0)
Please sign in to comment.