We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2d13eae + 59b2af1 commit 9d46d1bCopy full SHA for 9d46d1b
packages/mdx/src/smooth-code/use-dimensions.tsx
@@ -63,7 +63,7 @@ function useDimensions(
63
.trimEnd()
64
.split(newlineRe)
65
66
- const originalLineCount = lines.length
+ const largestLineNumber = Math.max(lines.length, 10)
67
68
if (rows) {
69
// make the lines match the requested number of rows
@@ -108,7 +108,7 @@ function useDimensions(
108
<div ref={ref} key={i}>
109
{lineNumbers ? (
110
<span className="ch-code-line-number">
111
- _{originalLineCount}
+ _{largestLineNumber}
112
</span>
113
) : undefined}
114
<div
0 commit comments