Skip to content

Commit 743a519

Browse files
committed
Scroll removed and code cell now expands to fit code
1 parent 4a7180a commit 743a519

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/AnnotatedCode/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ for (const attr of codeTag.attributes) {
9595
return (
9696
<tr class="[&>*]:align-top [&>*]:m-0 [&>*:not(:first-child)]:py-2 [&>*:not(:first-child)]:pl-6 [&>*:not(:first-child)]:max-w-xl">
9797
<td class="align-top p-0" style="height:100%; margin:0">
98-
<pre {...preAttrs} style={`${getPreStyle(i)};height:100%`}><code {...codeAttrs} set:html={lineNodes.map((n) => n.outerHTML).join('\n')} /></pre>
98+
<pre {...preAttrs} style={`${getPreStyle(i)};overflow:visible;white-space:pre-wrap;word-wrap:break-word;`}><code {...codeAttrs} set:html={lineNodes.map((n) => n.outerHTML).join('\n')} /></pre>
9999
</td>
100100
{props.columns ? (
101101
<Fragment set:html={row.slot ? Astro.slots.render(row.slot) : undefined} />

0 commit comments

Comments
 (0)