mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-22 00:40:12 +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
10
lib/md042.js
10
lib/md042.js
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var shared = require("./shared");
|
||||
const shared = require("./shared");
|
||||
|
||||
var emptyLinkRe = /\[[^\]]*](?:\((?:#?|(?:<>))\))/;
|
||||
const emptyLinkRe = /\[[^\]]*](?:\((?:#?|(?:<>))\))/;
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD042", "no-empty-links" ],
|
||||
|
|
@ -12,9 +12,9 @@ module.exports = {
|
|||
"tags": [ "links" ],
|
||||
"function": function MD042(params, onError) {
|
||||
shared.filterTokens(params, "inline", function forToken(token) {
|
||||
var inLink = false;
|
||||
var linkText = "";
|
||||
var emptyLink = false;
|
||||
let inLink = false;
|
||||
let linkText = "";
|
||||
let emptyLink = false;
|
||||
token.children.forEach(function forChild(child) {
|
||||
if (child.type === "link_open") {
|
||||
inLink = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue