We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 628edfe commit d6c3dc7Copy full SHA for d6c3dc7
packages/mdx/src/remark/transform.ts
@@ -132,6 +132,14 @@ async function addConfig(
132
const themeName =
133
typeof theme === "string" ? theme : theme.name
134
const style = `[data-ch-theme="${themeName}"] \{ ${rules} \}`
135
+
136
+ const codeConfig = {
137
+ staticMediaQuery: config.staticMediaQuery,
138
+ lineNumbers: config.lineNumbers,
139
+ showCopyButton: config.showCopyButton,
140
+ themeName,
141
+ }
142
143
tree.children.unshift({
144
type: "mdxJsxFlowElement",
145
name: "style",
@@ -202,11 +210,7 @@ async function addConfig(
202
210
type: "Identifier",
203
211
name: CH_CODE_CONFIG_VAR_NAME,
204
212
},
205
- init: valueToEstree({
206
- ...config,
207
- themeName,
208
- theme: undefined,
209
- }),
213
+ init: valueToEstree(codeConfig),
214
215
],
216
kind: "const",
0 commit comments