-
Notifications
You must be signed in to change notification settings - Fork 152
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
addSection in parserPlugins obliterate previous section content in certain cases #683
Comments
kevinansfield
added a commit
to kevinansfield/mobiledoc-kit
that referenced
this issue
Jun 3, 2019
…ances closes bustle#683 - `addSection` which is called by parser plugins was removing the section rather than closing it when it contains text due to a missing conditional
@sdhull you were spot on with the required change to the conditional, PR opened with the change and a test here #685 The reason |
Thank you @kevinansfield! 🙏 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a demo see https://jsfiddle.net/1rmndk8w/4/
The way I discovered this was by copying & pasting a github comment with an image. I found that the text immediately preceding the image was gone after pasting.
I believe this is because
state.text
is not properly tracking everything but I'm not exactly intimately familiar with the code so I'm not certain.One thing that is interesting is that in this case,
this.state.section.text
has the text butthis.state.text
is an empty string. Perhaps this check could be changed to includethis.state.section.text
?/cc @kevinansfield
The text was updated successfully, but these errors were encountered: