From e7c19e97447c69fdda5a89fcabda47f136578753 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 7 Mar 2022 20:31:17 -0400 Subject: escapable '-' and '>' (list/quote) --- src/upd8.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/upd8.js b/src/upd8.js index 1262fc1a..96fb3106 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -599,6 +599,15 @@ function transformMultiline(text, { inBlockquote = false; outLines.push(''); } + + // let some escaped symbols display as the normal symbol, since the + // point of escaping them is just to avoid having them be treated as + // syntax markers! + if (lineContent.match(/( *)\\-/)) { + lineContent = lineContent.replace('\\-', '-'); + } else if (lineContent.match(/( *)\\>/)) { + lineContent = lineContent.replace('\\>', '>'); + } } if (lineTag === 'p') { -- cgit 1.3.0-6-gf8a5