Skip to content

Commit 1bd5db7

Browse files
committed
Allow highlighting empty lines
1 parent f5488d5 commit 1bd5db7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

remark/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function hasLineHighlights(code) {
131131
if (!/^>/m.test(code)) {
132132
return false
133133
}
134-
return code.split('\n').every((line) => line === '' || /^[> ] /.test(line))
134+
return code.split('\n').every((line) => line === '' || line === '>' || /^[> ] /.test(line))
135135
}
136136

137137
module.exports.highlightCode = function highlightCode(code, prismLanguage) {

0 commit comments

Comments
 (0)