Skip to content

Commit

Permalink
fix(docz-core): escape template string in playground (#529)
Browse files Browse the repository at this point in the history
fix: escape ${} for template string in playground
  • Loading branch information
yaodingyd authored and pedronauck committed Dec 19, 2018
1 parent db1e158 commit 5ab2349
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/docz-utils/src/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const sanitizeCode = (code: string) => {
.trim()
.replace(/'/g, `\\'`)
.replace(/`/g, '\\`')
.replace(/\${.*}/g, (match: string) => `\\${match}`)
}

export const componentName = (value: any) => {
Expand Down

0 comments on commit 5ab2349

Please sign in to comment.