Skip to content

Commit

Permalink
Fix code block
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiaslins committed Apr 21, 2020
1 parent 4e8ea89 commit 42cbc47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ const Code: React.FC<{ code: string; language: string }> = ({
languages[language.toLowerCase()] || languages.javascript;

return (
<code
className="notion-code"
dangerouslySetInnerHTML={{
__html: highlight(code, prismLanguage, language)
}}
/>
<pre>
<code
className="notion-code"
dangerouslySetInnerHTML={{
__html: highlight(code, prismLanguage, language)
}}
/>
</pre>
);
};

Expand Down
1 change: 1 addition & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ h3 {
font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier,
monospace;
box-sizing: border-box;
overflow-x: scroll;
}

.notion-column {
Expand Down

0 comments on commit 42cbc47

Please sign in to comment.