@worktile/theia 19.1.0 → 19.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.
@@ -10759,12 +10759,11 @@ const withHeading = (editor) => {
10759
10759
  insertBreak();
10760
10760
  };
10761
10761
  editor.isVisible = (node) => {
10762
- const path = AngularEditor.findPath(editor, node);
10763
- if (path.length === 1) {
10764
- const index = path[0];
10762
+ const index = editor.children.indexOf(node);
10763
+ if (index !== -1) {
10765
10764
  const headingLevel = HeaderLevelMap[node.type];
10766
10765
  // 如果本身是一级标题,则不折叠
10767
- if (isStandardHeadingElement(node)) {
10766
+ if (headingLevel === HeaderLevelMap[ElementKinds.heading_1]) {
10768
10767
  return true;
10769
10768
  }
10770
10769
  // 如果本身是二级标题,只可能被一级标题影响