Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function transformMarkdown(buf: Buffer | string): string {
let state = 'root'
let codeBlockEnd = ''
let prevLineIsEmpty = true
for (const line of bufToString(buf).split(/\r?\n/)) {
for (const line of bufToString(buf).split(/\r?\n|\r|\u2028|\u2029/)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's simplify a bit: /\r\n|[\n\r\u2028\u2029]/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you test it ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it work

switch (state) {
case 'root':
if (tabRe.test(line) && prevLineIsEmpty) {
Expand Down