prosemirror-view 1.23.2 → 1.23.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/CHANGELOG.md +6 -0
- package/dist/index.es.js +4 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/clipboard.js +4 -1
package/CHANGELOG.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -2998,7 +2998,8 @@ function parseFromClipboard(view, text, html, plainText, $context) {
|
|
|
2998
2998
|
preserveWhitespace: !!(asText || sliceData),
|
|
2999
2999
|
context: $context,
|
|
3000
3000
|
ruleFromNode: function ruleFromNode(dom) {
|
|
3001
|
-
if (dom.nodeName == "BR" && !dom.nextSibling
|
|
3001
|
+
if (dom.nodeName == "BR" && !dom.nextSibling &&
|
|
3002
|
+
dom.parentNode && !inlineParents.test(dom.parentNode.nodeName)) { return {ignore: true} }
|
|
3002
3003
|
}
|
|
3003
3004
|
});
|
|
3004
3005
|
}
|
|
@@ -3020,6 +3021,8 @@ function parseFromClipboard(view, text, html, plainText, $context) {
|
|
|
3020
3021
|
return slice
|
|
3021
3022
|
}
|
|
3022
3023
|
|
|
3024
|
+
var inlineParents = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
|
|
3025
|
+
|
|
3023
3026
|
// Takes a slice parsed with parseSlice, which means there hasn't been
|
|
3024
3027
|
// any content-expression checking done on the top nodes, tries to
|
|
3025
3028
|
// find a parent node in the current context that might fit the nodes,
|