Skip to content

Commit

Permalink
Allow for a Footnotes section at the end of an Awesome list (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Sep 3, 2020
1 parent 8185b11 commit 2ce6b16
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 4 deletions.
3 changes: 2 additions & 1 deletion rules/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const sectionHeadingBlacklist = new Set([
'Contribute',
'Contributing',
'Licence',
'License'
'License',
'Footnotes'
]);

module.exports = rule('remark-lint:awesome-toc', (ast, file) => {
Expand Down
8 changes: 8 additions & 0 deletions test/fixtures/toc/0.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ non-empty

non-empty

## Contributing

non-empty

## License

non-empty

## Footnotes

non-empty
10 changes: 9 additions & 1 deletion test/fixtures/toc/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ non-empty

non-empty

## License
## Contribute

non-empty

## Licence

non-empty

## Footnotes

non-empty
8 changes: 8 additions & 0 deletions test/fixtures/toc/2.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,11 @@ non-empty
## License

non-empty

## Contribute

non-empty

## Footnotes

non-empty
10 changes: 9 additions & 1 deletion test/fixtures/toc/3.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ non-empty

non-empty

## License
## Footnotes

non-empty

## Licence

non-empty

## Contribute

non-empty
10 changes: 9 additions & 1 deletion test/fixtures/toc/4.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ non-empty

non-empty

## License
## Footnotes

non-empty

## Contribute

non-empty

## Licence

non-empty
4 changes: 4 additions & 0 deletions test/fixtures/toc/5.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ This section should be ignored.
## License

This section should be ignored.

## Footnotes

This section should be ignored.

0 comments on commit 2ce6b16

Please sign in to comment.