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
|
|
@ -14,6 +14,10 @@ module.exports = {
|
|||
"function": function MD010(params, onError) {
|
||||
const codeBlocks = params.config.code_blocks;
|
||||
const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
||||
const spacesPerTab = params.config.spaces_per_tab;
|
||||
const spaceMultiplier = (spacesPerTab === undefined) ?
|
||||
1 :
|
||||
Math.max(0, Number(spacesPerTab));
|
||||
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
||||
if (!inCode || includeCodeBlocks) {
|
||||
let match = null;
|
||||
|
|
@ -29,7 +33,7 @@ module.exports = {
|
|||
{
|
||||
"editColumn": column,
|
||||
"deleteCount": length,
|
||||
"insertText": "".padEnd(length)
|
||||
"insertText": "".padEnd(length * spaceMultiplier)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue