tiptap-markdown-react 0.10.2 → 0.10.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.
- package/dist/anchorRange.d.ts +6 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/style.css +19 -0
- package/package.json +1 -1
package/dist/anchorRange.d.ts
CHANGED
|
@@ -17,7 +17,12 @@ export interface AnchorRange {
|
|
|
17
17
|
/** doc 坐标 */
|
|
18
18
|
from: number;
|
|
19
19
|
to: number;
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* 区间当前的纯文本。**按匹配器的口径**给出:`commentMapper` 把区间内的 text 节点
|
|
22
|
+
* 直接拼起来(块之间**没有分隔符**),所以这里也是 `textBetween(from, to)`(不传
|
|
23
|
+
* blockSeparator)。调用方拿它跟「建锚点时用的那段文本」比对——两边必须同一口径,
|
|
24
|
+
* 否则多块区间(表格 / 列表)会永远对不上。
|
|
25
|
+
*/
|
|
21
26
|
text: string;
|
|
22
27
|
status: CommentAnchorStatus;
|
|
23
28
|
}
|
package/dist/index.js
CHANGED
|
@@ -3113,7 +3113,8 @@ function findRangeByAnchor(editor, anchor) {
|
|
|
3113
3113
|
return {
|
|
3114
3114
|
from: range.from,
|
|
3115
3115
|
to: range.to,
|
|
3116
|
-
|
|
3116
|
+
// 无 blockSeparator:与 commentMapper 的 `collectText`(text 节点直接拼接)同一口径
|
|
3117
|
+
text: editor.state.doc.textBetween(range.from, range.to),
|
|
3117
3118
|
status: result.status
|
|
3118
3119
|
};
|
|
3119
3120
|
}
|