From 749b463e6ea5309b6467e50ed5a9daa765cbaf73 Mon Sep 17 00:00:00 2001 From: Chris Campbell Date: Wed, 11 Dec 2024 15:31:39 -0800 Subject: [PATCH] fix: throw an error if text block contains HTML comment markup --- packages/docs-builder/src/context.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/docs-builder/src/context.ts b/packages/docs-builder/src/context.ts index beb15a2..0a3b685 100644 --- a/packages/docs-builder/src/context.ts +++ b/packages/docs-builder/src/context.ts @@ -146,6 +146,17 @@ export class Context { } } + // Fail the build if a block contains an HTML comment; usually when a comment appears + // it is the result of a misconfigured command block (like for a `section` or `def`), + // and those should never appear in the translation files, so we trap them here + if (text.includes('