fix: preserve inline directive spacing tests (thanks @joshp123) (#539)

This commit is contained in:
Peter Steinberger
2026-01-09 00:36:40 +01:00
parent 43545a4864
commit f666f60731
3 changed files with 23 additions and 2 deletions

View File

@@ -271,8 +271,9 @@ export function extractQueueDirective(body?: string): {
const argsStart = start + "/queue".length;
const args = body.slice(argsStart);
const parsed = parseQueueDirectiveArgs(args);
const cleanedRaw =
body.slice(0, start) + " " + body.slice(argsStart + parsed.consumed);
const cleanedRaw = `${body.slice(0, start)} ${body.slice(
argsStart + parsed.consumed,
)}`;
const cleaned = cleanedRaw.replace(/\s+/g, " ").trim();
return {
cleaned,