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

Don't ignore lengths of subchilds when calculating entity lengths #51

Merged

Conversation

benmccormick
Copy link
Contributor

Currently mdToDraftJS has a bug when considering nested styles/entities where it miscalculates lengths when things are nested. For instance, it views markdown like

[la**b**el](test.com) and says that the link has length 4 and offset 0 (because it considers **b** to have 0 length).

This PR adds 1 test and adjusts another test that had incorrect expectations to verify this behavior and adds a fix.

@benmccormick
Copy link
Contributor Author

@kadikraman not sure if you're actively maintaining this repo nowadays, but it would be a huge help if we could get this in. Will greatly appreciate any time you have to check it out, and please let me know if there is any more info I can provide to make this easier. 🙏

@benmccormick
Copy link
Contributor Author

@kadikraman just reaching out on this again. Any time you could give to moving this through would be greatly appreciated, or if you could let me know you're not actively maintaining this I can plan on finding a different workaround. Thanks!

@benmccormick
Copy link
Contributor Author

@kadikraman Reaching out one more time on this, would be super helpful to have clarity on whether its realistic to expect to see this get in. Anything you can do would be appreciated!

@kadikraman kadikraman merged commit 3f02b0d into kadikraman:master Jan 9, 2020
@kadikraman
Copy link
Owner

Thanks for the PR! Looks good to me, I've published this in v1.3.0 🎉

@benmccormick
Copy link
Contributor Author

Wonderful, thanks so much @kadikraman!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants