Update re-implementation of MD044/proper-names to exclude link destinations and references.

This commit is contained in:
David Anson 2021-06-13 13:07:03 -07:00
parent 4db40256d9
commit 72543a82e7
4 changed files with 99 additions and 16 deletions

View file

@ -29,7 +29,11 @@ module.exports.orderedListItemMarkerRe = /^[\s>]*0*(\d+)[.)]/;
const emphasisMarkersRe = /[_*]/g;
// Regular expression for inline links and shortcut reference links
const linkRe = /\[(?:[^[\]]|\[[^\]]*\])*\](?:\(\S*\))?/g;
const linkRe = /(\[(?:[^[\]]|\[[^\]]*\])*\])(\(\S*\)|\[\S*\])?/g;
module.exports.linkRe = linkRe;
// Regular expression for link reference definition lines
module.exports.linkReferenceRe = /^ {0,3}\[[^\]]+]:\s.*$/;
// readFile options for reading with the UTF-8 encoding
module.exports.utf8Encoding = "utf8";