fix corner case in merge_vars (#5320)

fixes #5319
This commit is contained in:
Alex Lam S.L
2022-01-28 08:05:57 +00:00
committed by GitHub
parent e4a91a89e0
commit 18f00457f6
4 changed files with 76 additions and 0 deletions

View File

@@ -103,6 +103,7 @@ function OutputStream(options) {
function make_indent(value) {
if (typeof value == "number") return new Array(value + 1).join(" ");
if (!value) return "";
if (!/^\s*$/.test(value)) throw new Error("unsupported indentation: " + JSON.stringify("" + value));
return value;
}