Skip to content

Commit 2208a36

Browse files
committed
Merge branch 'master' of github.com:splitbee/react-notion
2 parents 4a04fd9 + 42cbc47 commit 2208a36

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.4.2",
2+
"version": "0.5.1",
33
"license": "MIT",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",

src/components/code.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ const Code: React.FC<{ code: string; language: string }> = ({
1010
languages[language.toLowerCase()] || languages.javascript;
1111

1212
return (
13-
<code
14-
className="notion-code"
15-
dangerouslySetInnerHTML={{
16-
__html: highlight(code, prismLanguage, language)
17-
}}
18-
/>
13+
<pre>
14+
<code
15+
className="notion-code"
16+
dangerouslySetInnerHTML={{
17+
__html: highlight(code, prismLanguage, language)
18+
}}
19+
/>
20+
</pre>
1921
);
2022
};
2123

src/styles.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ h3 {
221221
font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier,
222222
monospace;
223223
box-sizing: border-box;
224+
overflow-x: scroll;
224225
}
225226

226227
.notion-column {

0 commit comments

Comments
 (0)