mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
This commit is contained in:
parent
6302b26c99
commit
47ff95e8d2
19 changed files with 157 additions and 4 deletions
|
|
@ -2143,6 +2143,10 @@ module.exports = {
|
|||
"function": function MD010(params, onError) {
|
||||
var codeBlocks = params.config.code_blocks;
|
||||
var includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
||||
var spacesPerTab = params.config.spaces_per_tab;
|
||||
var spaceMultiplier = (spacesPerTab === undefined) ?
|
||||
1 :
|
||||
Math.max(0, Number(spacesPerTab));
|
||||
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
||||
if (!inCode || includeCodeBlocks) {
|
||||
var match = null;
|
||||
|
|
@ -2152,7 +2156,7 @@ module.exports = {
|
|||
addError(onError, lineIndex + 1, "Column: " + column, null, [column, length_1], {
|
||||
"editColumn": column,
|
||||
"deleteCount": length_1,
|
||||
"insertText": "".padEnd(length_1)
|
||||
"insertText": "".padEnd(length_1 * spaceMultiplier)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue