diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-03-07 20:31:17 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-03-07 20:31:17 -0400 |
commit | e7c19e97447c69fdda5a89fcabda47f136578753 (patch) | |
tree | 56d55700792b64a060d371a9b03a7af39b7f13d9 | |
parent | 0126aca3e2c3d265be0d52728ce031ab27e380f3 (diff) |
escapable '-' and '>' (list/quote)
-rwxr-xr-x | src/upd8.js | 9 |
1 files changed, 9 insertions, 0 deletions
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('</blockquote>'); } + + // 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') { |