Templates: Always parse blocks from content#9448
Merged
youknowriad merged 1 commit intomasterfrom Aug 30, 2018
Merged
Conversation
youknowriad
approved these changes
Aug 29, 2018
Contributor
youknowriad
left a comment
There was a problem hiding this comment.
Seems legit code-wise. Can't test at the moment though. Feel free to merge if you're confident otherwise I'll test tomorrow.
Contributor
|
Tested and confirmed that it works great. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9433
This pull request seeks to resolve an issue where no demo content is shown on the demo screen. It does without sacrificing the original intent of #9288, which had been the cause for the regression described by #9433.
Post content is always parsed, regardless of whether a template is assigned or the post is new or being edited. This allows the initial demo content to be parsed as blocks.
If a template exists and the post is new, only then is the template applied by synchronizing. In most cases, the initial content would have been empty and the blocks an empty array (as had existed in previous logic), but this also accounts for potential divergences between content of the new post and the template.
Testing instructions:
Repeat steps to reproduce from #9433, verifying demo content is shown.
Repeat testing instructions from #9288.
Ensure end-to-end tests pass: