You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The text was updated successfully, but these errors were encountered:
I've checked the code and identified that the regex to replace italic markdown (_) does not cover the above issue!
here is the working regex to solve this issue: output.replace(/([_]+)(.*?\S)([_]+)/g, '$2'));
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:
The text was updated successfully, but these errors were encountered: