Skip to content

Commit cec271b

Browse files
committed
fix(code-block): code-block line numbers without padding
1 parent 66e9e3b commit cec271b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/code-block/src/code-block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const CodeBlock = React.forwardRef<HTMLPreElement, CodeBlockProps>(
9797
<p key={lineIndex} style={{ margin: 0, minHeight: "1em" }}>
9898
{props.lineNumbers ? (
9999
<span
100-
style={{ maxWidth: "1.875em", fontFamily: props.fontFamily }}
100+
style={{ width: "2em", display: "inline-block", fontFamily: props.fontFamily }}
101101
>
102102
{lineIndex + 1}
103103
</span>

0 commit comments

Comments
 (0)