Static Site Editor initial non-mode switch saving bug
Summary
- The issue is that on initial edit in WYSIWYG mode WITHOUT changing to Markdown mode results in an
editable
that has an updatedbody
, but not an updatedraw
. - Then the
Object.assign
below, the oldraw
gets used in theparse
and thus thebody
update is never reflected. - This is a non-issue when an initial Markdown mode change occurs as
syncRaw
will get called which leverages the recently updatedbody
so all is well. - This issue actually happens in the opposite direction (Markdown mode) too if you were to go to it initially, make an edit, and then save while staying in Markdown mode
Steps to reproduce
- Use static site editor
- Make edit in initial WYSIWYG mode
- Save
Bug: syncing never happens and the saved raw
(with front matter) vs. body
(no frontmatter) doesn't account for the body
changes.
Edited by Derek Knox