fix: make all-contributors output prettier compliant. (#283)

Fixes #441
This commit is contained in:
Erek Speed 2020-09-17 06:28:03 +09:00 committed by GitHub
parent 0c75595156
commit 1affe41308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -20,6 +20,7 @@ These people contributed to the project:
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END --> <!-- ALL-CONTRIBUTORS-LIST:END -->
Thanks a lot everyone!" Thanks a lot everyone!"
@ -51,6 +52,7 @@ These people contributed to the project:
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END --> <!-- ALL-CONTRIBUTORS-LIST:END -->
Thanks a lot everyone!" Thanks a lot everyone!"

View file

@ -143,6 +143,7 @@ test('inject nothing if there are no contributors', () => {
'<!-- markdownlint-disable -->', '<!-- markdownlint-disable -->',
'<!-- markdownlint-restore -->', '<!-- markdownlint-restore -->',
'<!-- prettier-ignore-end -->', '<!-- prettier-ignore-end -->',
'',
'<!-- ALL-CONTRIBUTORS-LIST:END -->', '<!-- ALL-CONTRIBUTORS-LIST:END -->',
'', '',
'Thanks a lot everyone!', 'Thanks a lot everyone!',

View file

@ -31,7 +31,7 @@ function injectListBetweenTags(newContent) {
newContent, newContent,
'<!-- markdownlint-restore -->', '<!-- markdownlint-restore -->',
'\n<!-- prettier-ignore-end -->', '\n<!-- prettier-ignore-end -->',
'\n', '\n\n',
previousContent.slice(startOfClosingTagIndex), previousContent.slice(startOfClosingTagIndex),
].join('') ].join('')
} }