You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the issue has been introduced by adding a new line in packages/decap-cms-core/src/backend.ts#entryToRaw method
let content = format.toFile(entry.get('data').toJS(), fieldsOrder, fieldsComments);
if (content.slice(-1) != '\n') {
// add the EOL if it does not exist.
content += '\n';
}
return content;
}
This is quite a dilemma. return trimEnd(markdown); appears to be there with a reason (introduced in #653), so we should be careful how we approach this.
Describe the bug
The Unsaved changes message appears when you edit and revert the changes.
To Reproduce
Expected behavior
The Unsaved Changes should be replaced with Changes Saved
Screenshots
Applicable Versions:
CMS configuration
https://github.com/decaporg/decap-cms/blob/main/dev-test/config.yml
with gitthub backend
Additional context
It seems like the issue has been introduced by adding a new line in
packages/decap-cms-core/src/backend.ts#entryToRaw
methodin #7039 while solving #1382
The addition of the newline is conflicting with the trimming the end of content in markdown widget at https://github.com/decaporg/decap-cms/blob/main/packages/decap-cms-widget-markdown/src/serializers/index.js#L151
The text was updated successfully, but these errors were encountered: