diff --git a/formatter-template/markdownlint-cli2-formatter-template.js b/formatter-template/markdownlint-cli2-formatter-template.js index 012e3a9..9d1b72b 100644 --- a/formatter-template/markdownlint-cli2-formatter-template.js +++ b/formatter-template/markdownlint-cli2-formatter-template.js @@ -3,7 +3,7 @@ "use strict"; // eslint-disable-next-line prefer-named-capture-group -const tokenRe = /\$\{([^:!}]+)(?:([:!])([^{}]*\{[^{}]+\}[^{}]*|[^}]+))?\}/igu; +const tokenRe = /\$\{(fileName|lineNumber|columnNumber|ruleName|ruleDescription|ruleInformation|errorContext|errorDetail)(?:([:!])([^{}]*\{[^{}]+\}[^{}]*|[^}]+))?\}/igu; // Output markdownlint-cli2 results using a template const outputFormatter = (options, params) => { diff --git a/test/snapshots/markdownlint-cli2-test-exec.js.md b/test/snapshots/markdownlint-cli2-test-exec.js.md index c6b5e6e..deb37bd 100644 --- a/test/snapshots/markdownlint-cli2-test-exec.js.md +++ b/test/snapshots/markdownlint-cli2-test-exec.js.md @@ -5139,11 +5139,11 @@ Generated by [AVA](https://avajs.dev). ##vso[task.logissue type=error;sourcepath=viewme.md;linenumber=6;code=MD025/single-title/single-h1]Multiple top-level headings in the same document␊ ##vso[task.logissue type=error;sourcepath=viewme.md;linenumber=12;columnumber=4;code=MD019/no-multiple-space-atx]Multiple spaces after hash on atx style heading␊ ##vso[task.logissue type=error;sourcepath=viewme.md;linenumber=14;columnumber=14;code=MD047/single-trailing-newline]Files should end with a single newline character␊ - #Undefined=#Column=10#Column=10##Column=10#␊ - #Undefined=#Column=##No column number#No column number#␊ - #Undefined=#Column=##No column number#No column number#␊ - #Undefined=#Column=4#Column=4##Column=4#␊ - #Undefined=#Column=14#Column=14##Column=14#`, + #Undefined=${undefined}#Column=10#Column=10##Column=10#␊ + #Undefined=${undefined}#Column=##No column number#No column number#␊ + #Undefined=${undefined}#Column=##No column number#No column number#␊ + #Undefined=${undefined}#Column=4#Column=4##Column=4#␊ + #Undefined=${undefined}#Column=14#Column=14##Column=14#`, stdout: `markdownlint-cli2 vX.Y.Z (markdownlint vX.Y.Z)␊ Finding: **/*.md␊ Linting: 1 file(s)␊ diff --git a/test/snapshots/markdownlint-cli2-test-exec.js.snap b/test/snapshots/markdownlint-cli2-test-exec.js.snap index fed06ee..8fd8469 100644 Binary files a/test/snapshots/markdownlint-cli2-test-exec.js.snap and b/test/snapshots/markdownlint-cli2-test-exec.js.snap differ diff --git a/test/snapshots/markdownlint-cli2-test-main.js.md b/test/snapshots/markdownlint-cli2-test-main.js.md index c76a91b..2b3b0bc 100644 --- a/test/snapshots/markdownlint-cli2-test-main.js.md +++ b/test/snapshots/markdownlint-cli2-test-main.js.md @@ -4377,11 +4377,11 @@ Generated by [AVA](https://avajs.dev). ##vso[task.logissue type=error;sourcepath=viewme.md;linenumber=6;code=MD025/single-title/single-h1]Multiple top-level headings in the same document␊ ##vso[task.logissue type=error;sourcepath=viewme.md;linenumber=12;columnumber=4;code=MD019/no-multiple-space-atx]Multiple spaces after hash on atx style heading␊ ##vso[task.logissue type=error;sourcepath=viewme.md;linenumber=14;columnumber=14;code=MD047/single-trailing-newline]Files should end with a single newline character␊ - #Undefined=#Column=10#Column=10##Column=10#␊ - #Undefined=#Column=##No column number#No column number#␊ - #Undefined=#Column=##No column number#No column number#␊ - #Undefined=#Column=4#Column=4##Column=4#␊ - #Undefined=#Column=14#Column=14##Column=14#␊ + #Undefined=${undefined}#Column=10#Column=10##Column=10#␊ + #Undefined=${undefined}#Column=##No column number#No column number#␊ + #Undefined=${undefined}#Column=##No column number#No column number#␊ + #Undefined=${undefined}#Column=4#Column=4##Column=4#␊ + #Undefined=${undefined}#Column=14#Column=14##Column=14#␊ `, stdout: `markdownlint-cli2 vX.Y.Z (markdownlint vX.Y.Z)␊ Finding: **/*.md␊ diff --git a/test/snapshots/markdownlint-cli2-test-main.js.snap b/test/snapshots/markdownlint-cli2-test-main.js.snap index fe8d01f..a0735ec 100644 Binary files a/test/snapshots/markdownlint-cli2-test-main.js.snap and b/test/snapshots/markdownlint-cli2-test-main.js.snap differ