@seafile/sdoc-editor 0.1.72 → 0.1.73
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.
|
@@ -27,10 +27,11 @@ var withHeader = function withHeader(editor) {
|
|
|
27
27
|
insertBreak();
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
+
var isAtLineEnd = isSelectionAtLineEnd(editor, match[1]);
|
|
30
31
|
var nextNode = Editor.next(editor, {
|
|
31
32
|
at: match[1]
|
|
32
33
|
});
|
|
33
|
-
if (nextNode) {
|
|
34
|
+
if (isAtLineEnd && nextNode && editor.children.length === 2) {
|
|
34
35
|
var _nextNode = _slicedToArray(nextNode, 2),
|
|
35
36
|
node = _nextNode[0],
|
|
36
37
|
path = _nextNode[1];
|
|
@@ -39,7 +40,6 @@ var withHeader = function withHeader(editor) {
|
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
var isAtLineEnd = isSelectionAtLineEnd(editor, match[1]);
|
|
43
43
|
|
|
44
44
|
// If an empty p is inserted at the end of the line, otherwise wrap normally
|
|
45
45
|
if (isAtLineEnd) {
|