From a184913c3febfdc722e2b23b6cab1b9d577dcf8a Mon Sep 17 00:00:00 2001 From: kserjey Date: Thu, 10 Jan 2019 17:34:42 +1000 Subject: [PATCH] fix: trim whitespaces before and after class --- core/docz-utils/src/jsx.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))