mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Update MD044/proper-names to support specifying multiple casings of the same name (ex: "Abc" and "ABC") (refs #435).
This commit is contained in:
parent
9310713da1
commit
8afec14376
4 changed files with 15 additions and 3 deletions
|
|
@ -51,7 +51,10 @@ module.exports = {
|
|||
const [ , leftMatch, nameMatch ] = match;
|
||||
const index = match.index + leftMatch.length;
|
||||
const length = nameMatch.length;
|
||||
if (!overlapsAnyRange(exclusions, lineIndex, index, length)) {
|
||||
if (
|
||||
!overlapsAnyRange(exclusions, lineIndex, index, length) &&
|
||||
!names.includes(nameMatch)
|
||||
) {
|
||||
addErrorDetailIf(
|
||||
onError,
|
||||
lineIndex + 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue