mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-21 08:20:12 +01:00
Add @stylistic/eslint-plugin to ESLint configuration.
This commit is contained in:
parent
fe02674ce0
commit
164bbac651
21 changed files with 103 additions and 78 deletions
10
lib/md031.js
10
lib/md031.js
|
|
@ -23,10 +23,12 @@ const codeFencePrefixRe = /^(.*?)[`~]/;
|
|||
function addError(onError, lines, lineNumber, top) {
|
||||
const line = lines[lineNumber - 1];
|
||||
const [ , prefix ] = line.match(codeFencePrefixRe) || [];
|
||||
const fixInfo = (prefix === undefined) ? null : {
|
||||
"lineNumber": lineNumber + (top ? 0 : 1),
|
||||
"insertText": `${prefix.replace(/[^>]/g, " ").trim()}\n`
|
||||
};
|
||||
const fixInfo = (prefix === undefined) ?
|
||||
null :
|
||||
{
|
||||
"lineNumber": lineNumber + (top ? 0 : 1),
|
||||
"insertText": `${prefix.replace(/[^>]/g, " ").trim()}\n`
|
||||
};
|
||||
addErrorContext(
|
||||
onError,
|
||||
lineNumber,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue