Update MD007/ul-indent to account for 4-space base indent within footnote definitions (fixes #1679).

This commit is contained in:
David Anson 2025-08-03 15:38:25 -07:00
parent 55700da8a2
commit 442afe4466
5 changed files with 129 additions and 1 deletions

View file

@ -53,8 +53,9 @@ export default {
const nesting = unorderedListNesting.get(parent);
if (nesting !== undefined) {
// listItemPrefix for listUnordered
const baseIndent = (getParentOfType(token, [ "gfmFootnoteDefinition" ])) ? 4 : 0;
const expectedIndent =
(startIndented ? startIndent : 0) + (nesting * indent);
baseIndent + (startIndented ? startIndent : 0) + (nesting * indent);
const blockQuoteAdjustment =
(lastBlockQuotePrefix?.endLine === startLine) ?
(lastBlockQuotePrefix.endColumn - 1) :