slate 0.101.1 → 0.101.4
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/dist/editor/marks.d.ts.map +1 -1
- package/dist/index.es.js +20 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/dist/slate.js +20 -3
- package/dist/slate.min.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../../../packages/slate/src/editor/marks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,eAAe,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../../../packages/slate/src/editor/marks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAQ9D,eAAO,MAAM,KAAK,EAAE,eAAe,CAAC,OAAO,CAwE1C,CAAA"}
|
package/dist/index.es.js
CHANGED
|
@@ -2806,12 +2806,31 @@ var marks = function marks(editor) {
|
|
|
2806
2806
|
if (!selection) {
|
|
2807
2807
|
return null;
|
|
2808
2808
|
}
|
|
2809
|
+
var {
|
|
2810
|
+
anchor,
|
|
2811
|
+
focus
|
|
2812
|
+
} = selection;
|
|
2809
2813
|
if (marks) {
|
|
2810
2814
|
return marks;
|
|
2811
2815
|
}
|
|
2812
2816
|
if (Range.isExpanded(selection)) {
|
|
2817
|
+
/**
|
|
2818
|
+
* COMPAT: Make sure hanging ranges (caused by double clicking in Firefox)
|
|
2819
|
+
* do not adversely affect the returned marks.
|
|
2820
|
+
*/
|
|
2821
|
+
var isEnd = Editor.isEnd(editor, anchor, anchor.path);
|
|
2822
|
+
if (isEnd) {
|
|
2823
|
+
var after = Editor.after(editor, anchor);
|
|
2824
|
+
if (after) {
|
|
2825
|
+
anchor = after;
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2813
2828
|
var [match] = Editor.nodes(editor, {
|
|
2814
|
-
match: Text.isText
|
|
2829
|
+
match: Text.isText,
|
|
2830
|
+
at: {
|
|
2831
|
+
anchor,
|
|
2832
|
+
focus
|
|
2833
|
+
}
|
|
2815
2834
|
});
|
|
2816
2835
|
if (match) {
|
|
2817
2836
|
var [_node] = match;
|
|
@@ -2821,9 +2840,6 @@ var marks = function marks(editor) {
|
|
|
2821
2840
|
return {};
|
|
2822
2841
|
}
|
|
2823
2842
|
}
|
|
2824
|
-
var {
|
|
2825
|
-
anchor
|
|
2826
|
-
} = selection;
|
|
2827
2843
|
var {
|
|
2828
2844
|
path
|
|
2829
2845
|
} = anchor;
|