mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Centralize handling of newlines in error detail/context to always replace (consecutive) newlines with a single space.
This commit is contained in:
parent
db967fd387
commit
cdfa934d8d
5 changed files with 21 additions and 45 deletions
|
@ -627,8 +627,8 @@ function lintContent(
|
|||
"ruleNames": rule.names,
|
||||
"ruleDescription": rule.description,
|
||||
"ruleInformation": information ? information.href : null,
|
||||
"errorDetail": errorInfo.detail || null,
|
||||
"errorContext": errorInfo.context || null,
|
||||
"errorDetail": errorInfo.detail?.replace(helpers.newLineRe, " ") || null,
|
||||
"errorContext": errorInfo.context?.replace(helpers.newLineRe, " ") || null,
|
||||
"errorRange": errorInfo.range ? [ ...errorInfo.range ] : null,
|
||||
"fixInfo": fixInfo ? cleanFixInfo : null
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue