Skip to content

Commit a030a66

Browse files
author
Peter Bengtsson
authored
Add tests to prove that getRange isn't called needlessly (#42941)
1 parent 17ec681 commit a030a66

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/content-linter/tests/unit/internal-link-punctuation.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,15 @@ describe(internalLinkPunctuation.names.join(' - '), () => {
4343
expect(errors[0].errorRange).toEqual([2, 30])
4444
expect(errors[9].lineNumber).toBe(10)
4545
})
46+
test('links that is not plain text', async () => {
47+
const markdown = [
48+
'[*emphasize*](./image.png)',
49+
'[**boldness**](./image.png)',
50+
'[**boldness** and *emphasize*](./image.png)',
51+
].join('\n')
52+
53+
const result = await runRule(internalLinkPunctuation, { markdown })
54+
const errors = result.markdown
55+
expect(errors.length).toBe(0)
56+
})
4657
})

0 commit comments

Comments
 (0)