mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Update markdown-it dependency to 4.0.1, fix breaking changes.
This commit is contained in:
parent
e305d22cce
commit
c764d2798f
4 changed files with 25 additions and 24 deletions
|
|
@ -64,12 +64,12 @@ function lintFile(file, config, callback) {
|
|||
var lines = contents.split(shared.newLineRe);
|
||||
// Annotate tokens with line/lineNumber
|
||||
tokens.forEach(function forToken(token) {
|
||||
if (token.lines) {
|
||||
token.line = lines[token.lines[0]];
|
||||
token.lineNumber = token.lines[0] + 1;
|
||||
if (token.map) {
|
||||
token.line = lines[token.map[0]];
|
||||
token.lineNumber = token.map[0] + 1;
|
||||
// Trim bottom of token to exclude whitespace lines
|
||||
while (!(lines[token.lines[1] - 1].trim())) {
|
||||
token.lines[1]--;
|
||||
while (!(lines[token.map[1] - 1].trim())) {
|
||||
token.map[1]--;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue