Allow question mark by default for MD026/no-trailing-punctuation (fixes #276).

This commit is contained in:
David Anson 2020-11-17 20:32:17 -08:00
parent 3827842930
commit 6c1bc8ecb5
8 changed files with 30 additions and 16 deletions

View file

@ -35,7 +35,11 @@ const linkRe = /\[(?:[^[\]]|\[[^\]]*\])*\](?:\(\S*\))?/g;
module.exports.utf8Encoding = "utf8";
// All punctuation characters (normal and full-width)
module.exports.allPunctuation = ".,;:!?。,;:!?";
const allPunctuation = ".,;:!?。,;:!?";
module.exports.allPunctuation = allPunctuation;
// All punctuation characters without question mark (normal and full-width)
module.exports.allPunctuationNoQuestion = allPunctuation.replace(/[?]/gu, "");
// Returns true iff the input is a number
module.exports.isNumber = function isNumber(obj) {