@quadrats/common 1.1.0 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quadrats/common",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "",
5
5
  "author": "Rytass",
6
6
  "homepage": "https://github.com/Quadrats/quadrats#readme",
@@ -381,10 +381,8 @@ function createTable(options = {}) {
381
381
  });
382
382
  if (cellEntry) {
383
383
  const [, cellPath] = cellEntry;
384
- // 檢查 cell 是否為空
385
- const cellText = Editor.string(editor, cellPath);
386
- if (!cellText.trim() && Editor.isStart(editor, selection.anchor, cellPath)) {
387
- // 在空的 table_cell 開頭按 backspace,不執行任何操作
384
+ if (Editor.isStart(editor, selection.anchor, cellPath)) {
385
+ // table_cell 開頭按 backspace,不執行任何操作
388
386
  return;
389
387
  }
390
388
  }
@@ -645,10 +645,8 @@ function createTable(options = {}) {
645
645
  });
646
646
  if (cellEntry) {
647
647
  const [, cellPath] = cellEntry;
648
- // 檢查 cell 是否為空
649
- const cellText = core.Editor.string(editor, cellPath);
650
- if (!cellText.trim() && core.Editor.isStart(editor, selection.anchor, cellPath)) {
651
- // 在空的 table_cell 開頭按 backspace,不執行任何操作
648
+ if (core.Editor.isStart(editor, selection.anchor, cellPath)) {
649
+ // table_cell 開頭按 backspace,不執行任何操作
652
650
  return;
653
651
  }
654
652
  }