mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Refactor to freeze parser tokens only when custom rules are present (negligable performance improvement).
This commit is contained in:
parent
a63972a666
commit
5e1b269fa5
4 changed files with 110 additions and 92 deletions
|
|
@ -73,7 +73,7 @@ module.exports = {
|
|||
if (autoLinks.length > 0) {
|
||||
// Re-parse with correct link/image reference definition handling
|
||||
const document = params.lines.join("\n");
|
||||
const tokens = parse(document, undefined, false);
|
||||
const tokens = parse(document);
|
||||
for (const token of literalAutolinks(tokens)) {
|
||||
const range = [
|
||||
token.startColumn,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue