I'm using this library along with react-draft-wysiwyg and I've found a scenario where the markdown will be missing a space after conversion.
Pre conversion text: This is not fine
Post conversion text: This is notfine
Doesn't lose any spaces: This is fine
Conversion code: draftjsToMd(convertToRaw(body.getCurrentContent()))
RawDraftContentState:
I think I fixed it locally by adding totalOffset += endingStyle.symbol.length; after adding the closing symbol but I'm not confident enough in this fix to open a pull request
Thanks for the detail! I think it's fine to add it, because it doesn't break any of the existing tests and I was able to add a failing test based on your example 💯
I'm using this library along with
react-draft-wysiwyg
and I've found a scenario where the markdown will be missing a space after conversion. Pre conversion text: This is not fine Post conversion text: This is notfine Doesn't lose any spaces: This is fine Conversion code:draftjsToMd(convertToRaw(body.getCurrentContent()))
RawDraftContentState:I think I fixed it locally by adding
totalOffset += endingStyle.symbol.length;
after adding the closing symbol but I'm not confident enough in this fix to open a pull request