zuchka/remove-markdown

Function Freezes with a large amount of spaces

Closed this issue · 7 comments

Running version 0.5.0. Saw issue #52 but that doesn't seem to have resolved this.

const removeMarkdown = require("remove-markdown")

const body = `@@ -7480,1160 +7480,4 @@\n scr)\n-%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   %0A\n
`

console.log(removeMarkdown(body))

Expected result: a response
Actual response: function never completes

You can try the above code on runkit, https://npm.runkit.com/remove-markdown, and it times out.

Looks like #57 will fix it. Tested with that version and it worked just fine.

zuchka commented

yes, #57 fixed this. I just merged the change. Now we need to cut a new release.

Oh man, I was just about to report this problem, but I see it's been reported a lot of times already.

Anyway, if you need more data to test the fix on, here goes a repro repository: https://github.com/gorohoroh/removemarkdown-repro

@zuchka Any plans for cutting a new release? It's been 2 years

@gorohoroh I would love to but the maintainer of the repo won't give me permissions and won't answer my messages. Alas, I am powerless

@stiang please cut a new release

@zuchka, I see now that you sent me a message about this in July 2023 which I apparently forgot to reply to - sorry about that!

Of course the current maintainer should be able to cut new releases. I also fully support your suggestion to move the repo to your GH account (or a separate org for the repo, that’s up to you), since it will no longer be me releasing new versions of it. Are you still OK with that solution?

Let’s move the repo first, then we can figure out how to give you access to npm.