Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't continue link over block break.

  • Loading branch information...
commit ceed1cfa81de6adcb1f8c28a7f1a46c4a08cac9f 1 parent cfe9bea
@neilj authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 source/Editor.js
View
8 source/Editor.js
@@ -1232,6 +1232,14 @@
var child = nodeAfterSplit.firstChild,
next;
+ // Don't continue links over a block break; unlikely to be the
+ // desired outcome.
+ if ( nodeAfterSplit.nodeName === 'A' ) {
+ nodeAfterSplit.replaceWith( nodeAfterSplit.empty() );
+ nodeAfterSplit = child;
+ continue;
+ }
+
while ( child && child.nodeType === TEXT_NODE && !child.data ) {
next = child.nextSibling;
if ( !next || next.nodeName === 'BR' ) {
Please sign in to comment.
Something went wrong with that request. Please try again.