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/dist/index.js CHANGED
@@ -3002,7 +3002,8 @@ function parseFromClipboard(view, text, html, plainText, $context) {
3002
3002
  preserveWhitespace: !!(asText || sliceData),
3003
3003
  context: $context,
3004
3004
  ruleFromNode: function ruleFromNode(dom) {
3005
- if (dom.nodeName == "BR" && !dom.nextSibling) { return {ignore: true} }
3005
+ if (dom.nodeName == "BR" && !dom.nextSibling &&
3006
+ dom.parentNode && !inlineParents.test(dom.parentNode.nodeName)) { return {ignore: true} }
3006
3007
  }
3007
3008
  });
3008
3009
  }
@@ -3024,6 +3025,8 @@ function parseFromClipboard(view, text, html, plainText, $context) {
3024
3025
  return slice
3025
3026
  }
3026
3027
 
3028
+ 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;
3029
+
3027
3030
  // Takes a slice parsed with parseSlice, which means there hasn't been
3028
3031
  // any content-expression checking done on the top nodes, tries to
3029
3032
  // find a parent node in the current context that might fit the nodes,