@@ -5,7 +5,7 @@ import path from 'path';
5
5
import test from 'ava' ;
6
6
import execa from 'execa' ;
7
7
8
- const errorPattern = / ( \. m d | \. m a r k d o w n | \. m d f | s t d i n ) : \d + M D \d { 3 } / gm;
8
+ const errorPattern = / ( \. m d | \. m a r k d o w n | \. m d f | s t d i n ) : \d + ( : \d + ) ? M D \d { 3 } / gm;
9
9
10
10
process . chdir ( './test' ) ;
11
11
@@ -226,10 +226,10 @@ test('linting results are sorted by file/line/names/description', async t => {
226
226
'incorrect.md:1 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## header 2"]' ,
227
227
'incorrect.md:1 MD041/first-line-heading/first-line-h1 First line in file should be a top level heading [Context: "## header 2"]' ,
228
228
'incorrect.md:2 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "# header"]' ,
229
- 'incorrect.md:5 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]' ,
230
- 'incorrect.md:11 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]' ,
231
- 'incorrect.md:17 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]' ,
232
- 'incorrect.md:23 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]' ,
229
+ 'incorrect.md:5:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]' ,
230
+ 'incorrect.md:11:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]' ,
231
+ 'incorrect.md:17:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]' ,
232
+ 'incorrect.md:23:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]' ,
233
233
''
234
234
] . join ( '\n' ) ;
235
235
t . deepEqual ( error . stdout , '' ) ;
@@ -376,7 +376,7 @@ function getCwdConfigFileTest(extension) {
376
376
t . fail ( ) ;
377
377
} catch ( error ) {
378
378
const expected = [
379
- 'heading-dollar.md:1 MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: \'$\']' ,
379
+ 'heading-dollar.md:1:10 MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: \'$\']' ,
380
380
''
381
381
] . join ( '\n' ) ;
382
382
t . deepEqual ( error . stdout , '' ) ;
@@ -637,8 +637,8 @@ test('.markdownlintignore is applied correctly', async t => {
637
637
t . fail ( ) ;
638
638
} catch ( error ) {
639
639
const expected = [
640
- 'incorrect.md:1 MD047/single-trailing-newline Files should end with a single newline character' ,
641
- 'subdir/incorrect.markdown:1 MD047/single-trailing-newline Files should end with a single newline character' ,
640
+ 'incorrect.md:1:8 MD047/single-trailing-newline Files should end with a single newline character' ,
641
+ 'subdir/incorrect.markdown:1:8 MD047/single-trailing-newline Files should end with a single newline character' ,
642
642
''
643
643
] . join ( '\n' ) ;
644
644
t . deepEqual ( error . stdout , '' ) ;
@@ -656,8 +656,8 @@ test('--ignore-path works with .markdownlintignore', async t => {
656
656
t . fail ( ) ;
657
657
} catch ( error ) {
658
658
const expected = [
659
- 'incorrect.md:1 MD047/single-trailing-newline Files should end with a single newline character' ,
660
- 'subdir/incorrect.markdown:1 MD047/single-trailing-newline Files should end with a single newline character' ,
659
+ 'incorrect.md:1:8 MD047/single-trailing-newline Files should end with a single newline character' ,
660
+ 'subdir/incorrect.markdown:1:8 MD047/single-trailing-newline Files should end with a single newline character' ,
661
661
''
662
662
] . join ( '\n' ) ;
663
663
t . deepEqual ( error . stdout , '' ) ;
@@ -675,7 +675,7 @@ test('--ignore-path works with .ignorefile', async t => {
675
675
t . fail ( ) ;
676
676
} catch ( error ) {
677
677
const expected = [
678
- 'incorrect.markdown:1 MD047/single-trailing-newline Files should end with a single newline character' ,
678
+ 'incorrect.markdown:1:8 MD047/single-trailing-newline Files should end with a single newline character' ,
679
679
''
680
680
] . join ( '\n' ) ;
681
681
t . deepEqual ( error . stdout , '' ) ;
0 commit comments