File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import {
1010type SpringConfig = Parameters < typeof useSpring > [ 1 ]
1111
1212type HTMLProps = React . DetailedHTMLProps <
13- React . HTMLAttributes < HTMLPreElement > ,
14- HTMLPreElement
13+ React . HTMLAttributes < HTMLDivElement > ,
14+ HTMLDivElement
1515>
1616
1717const defaultSpring = {
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ import {
1616import { SmoothLines } from "./smooth-lines"
1717
1818type HTMLProps = React . DetailedHTMLProps <
19- React . HTMLAttributes < HTMLPreElement > ,
20- HTMLPreElement
19+ React . HTMLAttributes < HTMLDivElement > ,
20+ HTMLDivElement
2121>
2222
2323export type CodeTweenProps = {
@@ -166,11 +166,13 @@ function Wrapper({
166166 children : React . ReactNode
167167} ) {
168168 return (
169- < pre
169+ < div
170170 { ...htmlProps }
171171 style = { {
172172 margin : 0 ,
173173 padding : 0 ,
174+ // using this instead of <pre> because https://github.com/code-hike/codehike/issues/120
175+ whiteSpace : "pre" ,
174176 ...style ,
175177 ...htmlProps ?. style ,
176178 } }
You can’t perform that action at this time.
0 commit comments