Update MD037/no-space-in-emphasis to ignore emphasis markers in link text (fixes #280).

This commit is contained in:
David Anson 2020-05-12 20:13:51 -07:00
parent f607a49a5b
commit ac5d52a3e3
3 changed files with 46 additions and 3 deletions

View file

@ -28,8 +28,8 @@ module.exports.orderedListItemMarkerRe = /^[\s>]*0*(\d+)[.)]/;
// Regular expression for all instances of emphasis markers
const emphasisMarkersRe = /[_*]/g;
// Regular expression for links
const linkRe = /\[(?:[^\]]|\[[^\]]*\])*\]\(\S*\)/g;
// Regular expression for inline links and shortcut reference links
const linkRe = /\[(?:[^[\]]|\[[^\]]*\])*\](?:\(\S*\))?/g;
// readFile options for reading with the UTF-8 encoding
module.exports.utf8Encoding = { "encoding": "utf8" };