mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Rename helpers.bareUrlRe to urlRe, improve it a little, add tests
This commit is contained in:
parent
6e38259a4a
commit
2e2937081e
5 changed files with 103 additions and 16 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { addErrorContext, bareUrlRe, withinAnyRange } = require("../helpers");
|
||||
const { addErrorContext, urlRe, withinAnyRange } = require("../helpers");
|
||||
const { codeBlockAndSpanRanges, htmlElementRanges, referenceLinkImageData } =
|
||||
require("./cache");
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ module.exports = {
|
|||
while ((match = htmlLinkRe.exec(line)) !== null) {
|
||||
lineExclusions.push([ lineIndex, match.index, match[0].length ]);
|
||||
}
|
||||
while ((match = bareUrlRe.exec(line)) !== null) {
|
||||
while ((match = urlRe.exec(line)) !== null) {
|
||||
const [ bareUrl ] = match;
|
||||
const matchIndex = match.index;
|
||||
const bareUrlLength = bareUrl.length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue