mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Refactor helpers.emphasisMarkersInContent slightly to avoid duplicate/unnecessary work.
This commit is contained in:
parent
11806dc5cb
commit
a508824b0f
3 changed files with 34 additions and 34 deletions
|
|
@ -105,7 +105,7 @@ module.exports = {
|
|||
let match = null;
|
||||
// Match all emphasis-looking runs in the line...
|
||||
while ((match = emphasisRe.exec(line))) {
|
||||
const ignoreMarkersForLine = ignoreMarkersByLine[lineIndex] || [];
|
||||
const ignoreMarkersForLine = ignoreMarkersByLine[lineIndex];
|
||||
const matchIndex = match.index + match[1].length;
|
||||
if (ignoreMarkersForLine.includes(matchIndex)) {
|
||||
// Ignore emphasis markers inside code spans and links
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue