Skip to content

Commit 60b05d7

Browse files
authored
Merge pull request #362 from code-hike/expand-empty-lines
Fix empty lines in expand code browser
2 parents 92162fb + 461fa2f commit 60b05d7

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

packages/mdx/src/mini-editor/code-browser.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,12 @@ function Content({
204204
/>
205205
{file.code.lines.map((line, i) => (
206206
<div key={i}>
207-
{line.tokens.length === 0 ? (
208-
<br />
209-
) : (
210-
line.tokens.map((token, i) => (
211-
<span key={i} {...token.props}>
212-
{token.content}
213-
</span>
214-
))
215-
)}
207+
{line.tokens.map((token, i) => (
208+
<span key={i} {...token.props}>
209+
{token.content}
210+
</span>
211+
))}
212+
<br />
216213
</div>
217214
))}
218215
</div>

0 commit comments

Comments
 (0)