From 3f72cbeb756a04b40665851bdf05f0ff1e3b049e Mon Sep 17 00:00:00 2001 From: Yuriy Demidov Date: Wed, 5 Oct 2022 17:03:40 +0300 Subject: [PATCH] feat(core): escape corner brackets during serialization --- src/core/markdown/MarkdownSerializer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/markdown/MarkdownSerializer.js b/src/core/markdown/MarkdownSerializer.js index 8ba9f579..bd8c0961 100644 --- a/src/core/markdown/MarkdownSerializer.js +++ b/src/core/markdown/MarkdownSerializer.js @@ -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; }