remove-markdown icon indicating copy to clipboard operation
remove-markdown copied to clipboard

Escaping with back slash does not work

Open Loskir opened this issue 3 years ago • 2 comments

const removeMd = require('remove-markdown');

const a = '\\_123\\_'

console.log(removeMd(a))

Input string: \_123\_ (backslash symbol, underscore symbol, ...) Output: \123\ Expected output: _123_

Loskir avatar Sep 27 '22 11:09 Loskir

@Loskir I would say that this is working as intended. if the idea is that escaping markdown would preserve the markdown syntax, then that is the opposite of this issue, which wants to remove markdown syntax even when it is escaped

zuchka avatar Jul 11 '23 22:07 zuchka

Wow I even forgot where I encountered this issue.

I would say that this module should work as if the input string was rendered as markdown and then copy-pasted as plain text. E.g. escaped character \_ would render as literal _.

But I get why someone would want another behavior.

Loskir avatar Jul 11 '23 22:07 Loskir