Skip to content

Commit 852a5cf

Browse files
authored
Fix accidental Markdown interpolation in docs
1 parent 09e23c4 commit 852a5cf

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

cli/src/prebuild.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,7 @@ const kabobToSentenceCase = (name: string) => {
115115

116116
const populateTemplate = (contents: string, title: string, templateContents: string): string => {
117117
return templateContents
118-
.replace(
119-
'MARKDOWN_PLACEHOLDER',
120-
contents
121-
.replace(/`/gu, '\\`')
122-
.replace(/(\{|\})/gu, "{'$1'}")
123-
)
118+
.replace('MARKDOWN_PLACEHOLDER', contents.replace(/`/gu, '\\`').replace(/\$\{/gu, '\\${'))
124119
.replace('TITLE_PLACEHOLDER', kabobToSentenceCase(title))
125120
}
126121

0 commit comments

Comments
 (0)