diff --git a/src/cli/index.ts b/src/cli/index.ts index 636c1e3..9f2702e 100755 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -150,7 +150,7 @@ program commands: [ ...setupCommands.map(expandMacro), ...parsed.commands.map(expandMacro), - ...teardownCommands, + ...teardownCommands.map(expandMacro), ], } diff --git a/src/parse.ts b/src/parse.ts index 802e2e6..35cda7b 100644 --- a/src/parse.ts +++ b/src/parse.ts @@ -82,7 +82,7 @@ function parseDefDirective( while (body.endsWith("\\") && i + extra + 1 < rawLines.length) { const next = rawLines[i + extra + 1]! - if (next.startsWith("$ ") || next.startsWith("@")) { + if (next.startsWith("$") || next.startsWith("@")) { throw new Error(`${path}:${i + extra + 2}: @def continuation consumed a command or directive line`) } body = body.slice(0, -1).trimEnd() + "\n" + next.trim()