Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replaced SyntaxHighlighter to prism to fix react components #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-redux": "^5.0.7",
"react-syntax-highlighter": "8.0.1",
"react-syntax-highlighter": "11.0.2",
"redux": "^4.0.0",
"redux-persist": "^5.10.0",
"redux-saga": "^0.16.0",
Expand Down
6 changes: 3 additions & 3 deletions src/public/js/components/sideBar/component/Code/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import classNames from 'classnames';
import SyntaxHighlighter from 'react-syntax-highlighter';
import { atomOneLight } from 'react-syntax-highlighter/styles/hljs';
import SyntaxHighlighter from 'react-syntax-highlighter/prism';
import { coy } from 'react-syntax-highlighter/styles/prism';
idoo marked this conversation as resolved.
Show resolved Hide resolved

import './index.less';

Expand Down Expand Up @@ -49,7 +49,7 @@ export default class extends React.Component {
<div className={classNames('Code', { limitedHeight })} ref={el => (this.codeRef = el)}>
<SyntaxHighlighter
language={language}
style={atomOneLight}
style={coy}
showLineNumbers={true}
wrapLines={true}
customStyle={{
Expand Down