Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(deps): bump react-code-view from v1 to v2
- Loading branch information
Showing
19 changed files
with
5,371 additions
and
1,545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
import React from 'react'; | ||
import ReactCodeView from 'react-code-view'; | ||
|
||
export interface CodeViewProps extends React.HTMLAttributes<HTMLDivElement> { | ||
theme?: 'light' | 'dark'; | ||
classPrefix?: string; | ||
delay?: number; | ||
showCode?: boolean; | ||
source?: string; | ||
dependencies?: any; | ||
babelTransformOptions?: any; | ||
babelOptions?: any; | ||
buttonClassName?: string; | ||
showCodeIcon?: React.ReactNode; | ||
renderToolbar?: (button: React.ReactNode) => React.ReactNode; | ||
} | ||
|
||
export default React.memo(function CodeView(props: CodeViewProps) { | ||
return <ReactCodeView classPrefix="rs-" {...props} />; | ||
export default React.memo(function CodeView(props: any) { | ||
return ( | ||
<ReactCodeView | ||
{...props} | ||
afterCompile={(code: string) => { | ||
return code.replace(/import\ [\w\,\{\}\ ]+\ from\ "[\w-]+";/gi, ''); | ||
}} | ||
/> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
@import './themes/hightlight/default.less'; | ||
|
||
.markdown { | ||
.rcv-markdown { | ||
h1 { | ||
font-size: 28px; | ||
code { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.