@@ -94,35 +94,44 @@ function PrismCode(props: CubePrismCodeProps, ref) {
9494 return (
9595 < PreElement ref = { ref } { ...otherProps } >
9696 < Highlight prism = { Prism } code = { code } language = { grammarLang as any } >
97- { ( { className, tokens, getLineProps, getTokenProps } ) => (
97+ { ( { className, style , tokens, getLineProps, getTokenProps } ) => (
9898 < code
9999 data-element = "Code"
100100 className = { `${ className } ${ isDiff ? ' diff-highlight' : '' } ` }
101+ style = { { ...style , color : undefined , backgroundColor : undefined } }
101102 >
102- { tokens . map ( ( line , i ) => (
103- < span
104- key = { i }
105- { ...getLineProps ( { line, key : i } ) }
106- style = { undefined }
107- >
108- { line . map ( ( token , key ) => {
109- const props = getTokenProps ( { token, key } ) ;
110-
111- return (
112- < span
113- key = { key }
114- { ...props }
115- style = { {
116- ...props . style ,
117- color : undefined ,
118- backgroundColor : undefined ,
119- } }
120- />
121- ) ;
122- } ) }
123- { '\n' }
124- </ span >
125- ) ) }
103+ { tokens . map ( ( line , i ) => {
104+ const props = getLineProps ( { line, key : i } ) ;
105+
106+ return (
107+ < span
108+ key = { i }
109+ { ...props }
110+ style = { {
111+ ...props . style ,
112+ color : undefined ,
113+ backgroundColor : undefined ,
114+ } }
115+ >
116+ { line . map ( ( token , key ) => {
117+ const props = getTokenProps ( { token, key } ) ;
118+
119+ return (
120+ < span
121+ key = { key }
122+ { ...props }
123+ style = { {
124+ ...props . style ,
125+ color : undefined ,
126+ backgroundColor : undefined ,
127+ } }
128+ />
129+ ) ;
130+ } ) }
131+ { '\n' }
132+ </ span >
133+ ) ;
134+ } ) }
126135 </ code >
127136 ) }
128137 </ Highlight >
0 commit comments