Skip to content

Commit

Permalink
feat(core): escape corner brackets during serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
d3m1d0v committed Oct 5, 2022
1 parent 52c5d3b commit 3f72cbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/markdown/MarkdownSerializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export class MarkdownSerializerState {
// have special meaning only at the start of the line.
esc(str, startOfLine) {
// TODO: add a setting which characters need to be escaped
str = str.replace(/[`\^+*\\~\[\]\{\}\$]/g, '\\$&');
str = str.replace(/[`\^+*\\~\[\]\{\}<>\$]/g, '\\$&');
if (startOfLine) str = str.replace(/^[:#\-*+>]/, '\\$&').replace(/^(\s*\d+)\./, '$1\\.');
return str;
}
Expand Down

0 comments on commit 3f72cbe

Please sign in to comment.