@lvce-editor/editor-worker 19.65.0 → 19.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editorWorkerMain.js +4 -4
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -6675,8 +6675,8 @@ const format = async editor => {
|
|
|
6675
6675
|
}
|
|
6676
6676
|
};
|
|
6677
6677
|
|
|
6678
|
-
const getNewEditor = async editor => {
|
|
6679
|
-
if (editor.formatOnSave) {
|
|
6678
|
+
const getNewEditor = async (editor, skipFormatting = false) => {
|
|
6679
|
+
if (editor.formatOnSave && !skipFormatting) {
|
|
6680
6680
|
return format(editor);
|
|
6681
6681
|
}
|
|
6682
6682
|
return editor;
|
|
@@ -6742,7 +6742,7 @@ const showSaveErrorDialog = async error => {
|
|
|
6742
6742
|
});
|
|
6743
6743
|
};
|
|
6744
6744
|
|
|
6745
|
-
const save = async editor => {
|
|
6745
|
+
const save = async (editor, skipFormatting = false) => {
|
|
6746
6746
|
try {
|
|
6747
6747
|
const {
|
|
6748
6748
|
applicationId,
|
|
@@ -6752,7 +6752,7 @@ const save = async editor => {
|
|
|
6752
6752
|
if (!isUntitledFile(uri) && (await isReadonlyFile(uri, applicationId))) {
|
|
6753
6753
|
return editor;
|
|
6754
6754
|
}
|
|
6755
|
-
const newEditor = await getNewEditor(editor);
|
|
6755
|
+
const newEditor = await getNewEditor(editor, skipFormatting);
|
|
6756
6756
|
const content = applyLineEndings(getText$1(newEditor), newEditor.endOfLine);
|
|
6757
6757
|
if (isUntitledFile(uri)) {
|
|
6758
6758
|
const pickedFilePath = await saveUntitledFile(uri, content, platform, applicationId);
|