@lvce-editor/editor-worker 19.65.0 → 19.66.1

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.
@@ -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);
@@ -9539,6 +9539,9 @@ const getEditorHoverInfo = async (editorUid, position) => {
9539
9539
  displayStringLanguageId = '',
9540
9540
  documentation = ''
9541
9541
  } = hover || {};
9542
+ if (!displayString.trim() && !documentation.trim() && matchingDiagnostics.length === 0) {
9543
+ return undefined;
9544
+ }
9542
9545
  const tokenizerPath = '';
9543
9546
  const lineInfos = displayString ? await tokenizeCodeBlock(displayString, displayStringLanguageId || fallbackDisplayStringLanguageId, tokenizerPath) : [];
9544
9547
  const wordPart = getWordBefore(editor, rowIndex, columnIndex);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.65.0",
3
+ "version": "19.66.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"