Skip to content

Commit

Permalink
fix: trim whitespaces before and after class
Browse files Browse the repository at this point in the history
  • Loading branch information
kserjey authored and pedronauck committed Jan 21, 2019
1 parent 92f675f commit a184913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/docz-utils/src/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a184913

Please sign in to comment.