Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please stop using remove-markdown #1

Open
ralt opened this issue Dec 7, 2018 · 0 comments
Open

Please stop using remove-markdown #1

ralt opened this issue Dec 7, 2018 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ralt
Copy link

ralt commented Dec 7, 2018

The library has a bunch of pretty bad things:

  • It chokes on markdown tables
  • It replaces things it shouldn't.

For the 2nd one, see e.g.: https://github.com/stiang/remove-markdown/blob/master/index.js#L33

An example:

'foo < bar baz >'.replace(/<[^>]*>/g, '')
"foo "

Ideally, the library should use a markdown parser, but remove-markdown is pretty far from it, so I'd suggest outright removing its use instead.

That said, I do not have a replacement to suggest :) not trying to be a smartass, really, just thought I'd give my opinion on a lib I had to monkey patch out of hugo-elasticsearch when adding it to my site.

Cheers,

@clarketm clarketm added good first issue Good for newcomers help wanted Extra attention is needed labels Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants