modules/ve-mw/ce/ve.ce.MWWikitextSurface.js
Function onCopy
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ve.ce.MWWikitextSurface.prototype.onCopy = function ( e ) {
const clipboardData = e.originalEvent.clipboardData,
text = this.getModel().getFragment().getText( true ).replace( /\n\n/g, '\n' );
if ( !text ) {
Function afterPasteInsertExternalData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ve.ce.MWWikitextSurface.prototype.afterPasteInsertExternalData = function ( targetFragment, pastedDocumentModel, contextRange ) {
const wasSpecial = this.pasteSpecial,
// TODO: This check returns true if the paste contains meaningful structure (tables, lists etc.)
// but no annotations (bold, links etc.).
wasPlain = wasSpecial || pastedDocumentModel.data.isPlainText( contextRange, true, undefined, true );