Skip to content

Commit 12619ea

Browse files
Update custom-markdown-parse.js
1 parent fb2a88f commit 12619ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builder/plugins/custom-markdown-parse.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ const { EOL } = require('os');
33

44

55
function extractHeaders(content) {
6-
const str = content.replace(/\r\n/g, '\n');
6+
// Get consitent line breaks across all OS.
7+
const str = content.replace(/\r\n/g, '\n');
78

89
const match = ('\n' + str + '\n#')
910
.match(/\n#+.*\n[\s\S]*?(?=\n#)/g);

0 commit comments

Comments
 (0)