Last line is always blank also causing an extra line number
See original GitHub issueHello, thank you for this amazing package. As the title says if write something like this:
$ npm init
It will result in something like that

Is there a way to avoid this issue?
My current configuration is:
<SyntaxHighlighter
language={match[1]}
PreTag="div"
style={a11yDark}
customStyle={{
padding: 0,
borderRadius: 0,
background: "rgba(0,0,0,0.1)",
}}
lineNumberStyle={{
color: "rgba(255,255,255,0.7)",
marginRight: "0.5rem",
}}
wrapLines={true}
showLineNumbers={true}
{...props}
/>
Many thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9
Top Results From Across the Web
Why is it recommended to have empty line in the end of a ...
Many older tools misbehave if the last line of data in a text file is not terminated with a newline or carriage return...
Read more >What's the point in adding a new line to the end of a file?
It's not about adding an extra newline at the end of a file, it's about not removing the newline that should be there....
Read more >Handy one-liners for SED
Output file # should contain no more than one blank line between lines of ... lines are always blank) sed 'n;d' NUMBERING: #...
Read more >Locate and reset the last cell on a worksheet - Microsoft Support
Empty cells may contain formatting that causes the last cell in a row or column to fall ... Tip: You can also click...
Read more >“Where did that line come from (and how do I get rid of it ...
What you're experiencing is an autoformatted paragraph border. Microsoft Word, by default, attempts to autoformat certain character sequences into their rich ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems that MDX rehype is parsing one more \n unnecessarily.
Temporarily I solved it like this:
Issue reopened.