JSHint for [36602].

See #33301.

git-svn-id: https://develop.svn.wordpress.org/trunk@36605 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2016-02-20 22:13:17 +00:00
parent 6e493b1713
commit 0659293ee2

View File

@ -74,8 +74,8 @@
var $ = window.jQuery;
function getSelectedLink() {
var href, html
node = editor.selection.getNode();
var href, html,
node = editor.selection.getNode(),
link = editor.dom.getParent( node, 'a[href]' );
if ( ! link ) {
@ -97,7 +97,7 @@
return link;
}
function removePlaceholders() {
editor.$( 'a' ).each( function( i, element ) {
var $element = editor.$( element );
@ -109,7 +109,7 @@
}
});
}
function removePlaceholderStrings( content, dataAttr ) {
if ( dataAttr ) {
content = content.replace( / data-wp-link-edit="true"/g, '' );
@ -236,12 +236,12 @@
}
}
} );
// Remove any remaining placeholders on saving.
editor.on( 'savecontent', function( event ) {
event.content = removePlaceholderStrings( event.content, true );
});
// Prevent adding undo levels on inserting link placeholder.
editor.on( 'BeforeAddUndo', function( event ) {
if ( event.level.content ) {