From 65aab78d3b6d538f986969c3caeafd071023e561 Mon Sep 17 00:00:00 2001 From: Thalia Date: Thu, 7 Nov 2013 14:30:41 +0000 Subject: [PATCH] Use rare unicode characters for paste placeholders Helps with bug reporting, like the snowman and pawn. Change-Id: Id133431eea987442c8b50a05821ebd54649b26b9 --- modules/ve/ce/ve.ce.Surface.js | 6 +++--- modules/ve/test/ce/ve.ce.Surface.test.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 3c93135bbc..02d57a9723 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -794,19 +794,19 @@ ve.ce.Surface.prototype.beforePaste = function ( e ) { // If there is content to the left of the cursor, put a placeholder // character to the left of the cursor if ( selection.start > range.start ) { - leftText = 'A'; + leftText = '☀'; context.push( leftText ); textStart = textEnd = 1; } // If there is content to the right of the cursor, put a placeholder // character to the right of the cursor if ( selection.end < range.end ) { - rightText = 'B'; + rightText = '☂'; context.push( rightText ); } // If there is no text context, select some text to be replaced if ( !leftText && !rightText ) { - context.push( 'C' ); + context.push( '☁' ); textEnd = 1; } context.push( { 'type': '/' + context[0].type } ); diff --git a/modules/ve/test/ce/ve.ce.Surface.test.js b/modules/ve/test/ce/ve.ce.Surface.test.js index 6a93292090..cbda2d4ae6 100644 --- a/modules/ve/test/ce/ve.ce.Surface.test.js +++ b/modules/ve/test/ce/ve.ce.Surface.test.js @@ -445,14 +445,14 @@ QUnit.test( 'beforePaste/afterPaste', function ( assert ) { }, { 'range': new ve.Range( 4 ), - 'pasteTargetHtml': 'BfooA', + 'pasteTargetHtml': '☂foo☀', 'expectedRange': new ve.Range( 9 ), 'expectedOps': [ [ { 'type': 'retain', 'length': 4 }, { 'type': 'replace', - 'insert': [ 'B', 'f', 'o', 'o', 'A' ], + 'insert': [ '☂', 'f', 'o', 'o', '☀' ], 'remove': [] }, { 'type': 'retain', 'length': 5 }