File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,14 @@ async function addConfig(
132
132
const themeName =
133
133
typeof theme === "string" ? theme : theme . name
134
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
+
135
143
tree . children . unshift ( {
136
144
type : "mdxJsxFlowElement" ,
137
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 ) ,
210
214
} ,
211
215
] ,
212
216
kind : "const" ,
You can’t perform that action at this time.
0 commit comments