Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix matching of opening curly quote in description #127

Merged
merged 5 commits into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion rules/list-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function validateListItemPrefixCasing(prefix, file) {
}

if (!listItemPrefixCaseWhitelist.has(caseOf(firstWord))) {
if (!/\d/.test(firstWord) && !/^["'(]/.test(firstWord)) {
if (!/\d/.test(firstWord) && !/^["'(]/.test(firstWord)) {
kdeldycke marked this conversation as resolved.
Show resolved Hide resolved
if (!identifierWhitelist.has(firstWord)) {
file.message('List item description must start with valid casing', prefix);
return false;
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/list-item/0.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Test description's ending punctuation.
- [foo](https://foo.com) - “Description is an other king of full quote ending with a question mark?”
- [foo](https://foo.com) - “Description is an other king of full quote ending with an ellipsis…”

- [foo](https://foo.com) - “Article's quote full of edge cases with non-balanced quote marks . But too long to be in full (…) so here is the best part — making an important point — with a twist.”

- [foo](https://foo.com) - Ending with a parenthetical. (Japanese)
- [foo](https://foo.com) - Ending with an emphasis parenthetical. *(Japanese)*
- [foo](https://foo.com) - Ending with a strong parenthetical. **(Japanese)**
Expand Down