mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Convert var to const/let (except in browser-only code).
This commit is contained in:
parent
78c1af7bfd
commit
213aef4564
56 changed files with 524 additions and 518 deletions
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var shared = require("./shared");
|
||||
const shared = require("./shared");
|
||||
|
||||
var reversedLinkRe = /\([^)]+\)\[[^\]^][^\]]*]/;
|
||||
const reversedLinkRe = /\([^)]+\)\[[^\]^][^\]]*]/;
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD011", "no-reversed-links" ],
|
||||
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
"tags": [ "links" ],
|
||||
"function": function MD011(params, onError) {
|
||||
shared.forEachInlineChild(params, "text", function forToken(token) {
|
||||
var match = reversedLinkRe.exec(token.content);
|
||||
const match = reversedLinkRe.exec(token.content);
|
||||
if (match) {
|
||||
shared.addError(onError, token.lineNumber, match[0], null,
|
||||
shared.rangeFromRegExp(token.line, reversedLinkRe));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue