remove-markdown
remove-markdown copied to clipboard
Wrong result when using multiple italic markdown in a sequence separated by space
Problem Statement:
-
The issue is when we have a sequential ‘_' (underscore) character after a space the package will replace the underscore from the only first word! Example: ‘Wizard with a gun' -> Wizard with a gun
-
Here 'Wizard’ and 'with’ both are separated by space and have an underscore around them so when we parse the string with the remove-markdown npm package it parses the first word. due to the next word being exactly after a space. Hence, it's not able to identify that word as a Markdown character!
Solution:
- For now, I've fixed this with a workaround code to break this sequence by manipulating the string to replace the _ _ sequence and fix the markdown below is the example code snippet I tried: