Skip to content

Commit 3d0bfd2

Browse files
committed
Replacing all carriage returns prior to highlighting to eliminate blank lines on output
1 parent e992469 commit 3d0bfd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HighlightPairedShortcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function (content, language, highlightNumbers, options = {}) {
1616
if( language === "text" ) {
1717
highlightedContent = content;
1818
} else {
19-
highlightedContent = Prism.highlight(content, PrismLoader(language), language);
19+
highlightedContent = Prism.highlight(content.replace(/\r/g, ""), PrismLoader(language), language);
2020
}
2121

2222
let group = new HighlightLinesGroup(highlightNumbers);

0 commit comments

Comments
 (0)