From c695b5c942d060d6ad2b41dbf8d8a365d3666d23 Mon Sep 17 00:00:00 2001 From: Jesse Seldess Date: Fri, 20 Feb 2026 15:37:58 -0500 Subject: [PATCH] Fix MDX parsing by escaping curly braces in JSDoc comment Escape {{ and {% in the JSDoc comment for templateUsesThreadVariables to prevent them from being interpreted as JSX expressions when generating MDX documentation. Co-Authored-By: Claude Sonnet 4.5 --- js/llm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/llm.ts b/js/llm.ts index 9ff8058..4682a4e 100644 --- a/js/llm.ts +++ b/js/llm.ts @@ -45,7 +45,7 @@ export const THREAD_VARIABLE_PATTERN = new RegExp( /** * Check if a template string might use thread-related template variables. - * This is a heuristic - looks for variable names after {{ or {% syntax. + * This is a heuristic - looks for variable names after `{{` or `{%` syntax. */ export function templateUsesThreadVariables(template: string): boolean { return THREAD_VARIABLE_PATTERN.test(template);