@worktile/theia 19.1.2 → 19.1.3
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.
|
@@ -10767,7 +10767,7 @@ const withHeading = (editor) => {
|
|
|
10767
10767
|
return true;
|
|
10768
10768
|
}
|
|
10769
10769
|
// 如果本身是二级标题,只可能被一级标题影响
|
|
10770
|
-
|
|
10770
|
+
let minHeadingLevel = headingLevel !== undefined ? headingLevel - 1 : HeaderLevelMap[ElementKinds.heading_4];
|
|
10771
10771
|
for (let i = index - 1; i >= 0; i--) {
|
|
10772
10772
|
const element = editor.children[i];
|
|
10773
10773
|
if (isHeadingElement(element)) {
|
|
@@ -10781,6 +10781,10 @@ const withHeading = (editor) => {
|
|
|
10781
10781
|
else if (element.isCollapsed) {
|
|
10782
10782
|
return false;
|
|
10783
10783
|
}
|
|
10784
|
+
else {
|
|
10785
|
+
// 遇到未折叠标题,则只能被比它更大的标题影响
|
|
10786
|
+
minHeadingLevel = elementHeadingLevel - 1;
|
|
10787
|
+
}
|
|
10784
10788
|
}
|
|
10785
10789
|
}
|
|
10786
10790
|
}
|