diff --git a/core/docz-utils/src/jsx.ts b/core/docz-utils/src/jsx.ts index d1dd9372c..a6bb08e44 100644 --- a/core/docz-utils/src/jsx.ts +++ b/core/docz-utils/src/jsx.ts @@ -21,7 +21,7 @@ export const sanitizeCode = (code: string) => { const trimmed = strip(code).trim() const newCode = trimmed.startsWith('{') && trimmed.endsWith('}') - ? trimmed.substr(1, trimmed.length - 2) + ? trimmed.substr(1, trimmed.length - 2).trim() : trimmed return escapeJS(strip(newCode))