@milkdown/transformer
Advanced tools
Comparing version 5.4.1 to 5.5.0
@@ -251,3 +251,3 @@ var __defProp = Object.defineProperty; | ||
const last = nextChildren[nextChildren.length - 1]; | ||
if (child.isMark && child.type === last.type) { | ||
if (last && child["isMark"] && child.type === last.type) { | ||
const _a = child, { children: currChildren } = _a, currRest = __objRest(_a, ["children"]); | ||
@@ -274,3 +274,3 @@ const _b = last, { children: prevChildren } = _b, prevRest = __objRest(_b, ["children"]); | ||
if (element.value) { | ||
node.value = element.value; | ||
node["value"] = element.value; | ||
} | ||
@@ -392,3 +392,3 @@ return node; | ||
var _a; | ||
return (_a = x.type.spec.priority) != null ? _a : 50; | ||
return (_a = x.type.spec["priority"]) != null ? _a : 50; | ||
}; | ||
@@ -395,0 +395,0 @@ const tmp = [...marks].sort((a, b) => getPriority(a) - getPriority(b)); |
{ | ||
"name": "@milkdown/transformer", | ||
"version": "5.4.1", | ||
"version": "5.5.0", | ||
"type": "module", | ||
@@ -20,3 +20,3 @@ "main": "./lib/index.es.js", | ||
"devDependencies": { | ||
"@milkdown/prose": "5.4.1" | ||
"@milkdown/prose": "5.5.0" | ||
}, | ||
@@ -27,3 +27,3 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@milkdown/exception": "5.4.1", | ||
"@milkdown/exception": "5.5.0", | ||
"remark": "^14.0.1", | ||
@@ -30,0 +30,0 @@ "tslib": "^2.3.1", |
@@ -33,3 +33,6 @@ /* Copyright 2021, Milkdown by Mirone. */ | ||
const proseType: NodeType | MarkType = this.schema[is === 'node' ? 'nodes' : 'marks'][key]; | ||
const proseType: NodeType | MarkType = this.schema[is === 'node' ? 'nodes' : 'marks'][key] as | ||
| NodeType | ||
| MarkType; | ||
runner(this, node, proseType as NodeType & MarkType); | ||
@@ -36,0 +39,0 @@ } |
@@ -25,3 +25,3 @@ /* Copyright 2021, Milkdown by Mirone. */ | ||
const last = nextChildren[nextChildren.length - 1]; | ||
if (child.isMark && child.type === last.type) { | ||
if (last && child['isMark'] && child.type === last.type) { | ||
const { children: currChildren, ...currRest } = child; | ||
@@ -54,3 +54,3 @@ const { children: prevChildren, ...prevRest } = last; | ||
if (element.value) { | ||
node.value = element.value; | ||
node['value'] = element.value; | ||
} | ||
@@ -57,0 +57,0 @@ |
@@ -51,3 +51,3 @@ /* Copyright 2021, Milkdown by Mirone. */ | ||
const { marks } = node; | ||
const getPriority = (x: ProseMark) => x.type.spec.priority ?? 50; | ||
const getPriority = (x: ProseMark) => x.type.spec['priority'] ?? 50; | ||
const tmp = [...marks].sort((a, b) => getPriority(a) - getPriority(b)); | ||
@@ -54,0 +54,0 @@ const unPreventNext = tmp.every((mark) => !this.#runProseMark(mark, node)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104728
1871
- Removed@milkdown/exception@5.4.1(transitive)
Updated@milkdown/exception@5.5.0