Skip to content

Commit

Permalink
Escape '>' at the start of line
Browse files Browse the repository at this point in the history
FIX: Serializing to Markdown now properly escapes '>' characters at the start
of the line.

Closes #56
  • Loading branch information
marijnh committed Sep 3, 2021
1 parent 1f415d5 commit f44936d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/to_markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ export class MarkdownSerializerState {
// have special meaning only at the start of the line.
esc(str, startOfLine) {
str = str.replace(/[`*\\~\[\]]/g, "\\$&")
if (startOfLine) str = str.replace(/^[:#\-*+]/, "\\$&").replace(/^(\s*\d+)\./, "$1\\.")
if (startOfLine) str = str.replace(/^[:#\-*+>]/, "\\$&").replace(/^(\s*\d+)\./, "$1\\.")
return str
}

Expand Down

0 comments on commit f44936d

Please sign in to comment.