From dcc13d5ded408f8268cc1cbbc0245f5e16d5c39c Mon Sep 17 00:00:00 2001 From: yvonneyx Date: Fri, 20 Sep 2024 17:13:35 +0800 Subject: [PATCH] fix: fix issue with indent setting not working correctly in intended tree --- src/layout/indented.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/indented.js b/src/layout/indented.js index 9d56ca2..f5b2ef3 100644 --- a/src/layout/indented.js +++ b/src/layout/indented.js @@ -3,7 +3,7 @@ const util = require("../util"); function positionNode(node, previousNode, indent, dropCap, align) { // caculate the node's horizontal offset DX, dx's type might be number or function const displacementX = - typeof indent === "function" ? indent(node) : indent * node.depth; + (typeof indent === "function" ? indent(node) : indent) * node.depth; if (!dropCap) { try {