Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/CodeSyntax.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const copyToClipboard = str => {
}


const CodeSyntax = ({ children, highlightedLines, language, showLineNumbers }) => {
const CodeSyntax = ({ id, children, highlightedLines, language, showLineNumbers }) => {

const copyCodeToClipboard = () => {
copyToClipboard(children)
Expand All @@ -56,7 +56,7 @@ const CodeSyntax = ({ children, highlightedLines, language, showLineNumbers }) =
newHighlightedLines[lineNumber] = 1
})
return (
<div>
<div id={id}>
<SyntaxHighlighter
style={githubGist}
language={language || 'javascript'}
Expand All @@ -74,6 +74,7 @@ const CodeSyntax = ({ children, highlightedLines, language, showLineNumbers }) =
}

CodeSyntax.propTypes = {
id: PropTypes.string.isRequired,
children: PropTypes.any.isRequired,
highlightedLines: PropTypes.array,
language: PropTypes.string,
Expand Down