From c852bf60008499911204fb39156d48bcc6665cf8 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 26 Nov 2013 22:59:39 +0000 Subject: [PATCH] ve.js: Coding style fixup for 6f2090aac6 Change-Id: I5ef9d590b5cc573df64f1c9099c79207c471cfb6 --- modules/ve/ve.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/ve/ve.js b/modules/ve/ve.js index 2e466e5f9b..2781a265dc 100644 --- a/modules/ve/ve.js +++ b/modules/ve/ve.js @@ -430,8 +430,10 @@ * @returns {number} Byte offset */ ve.getByteOffset = function ( text, clusterOffset ) { - return unicodeJS.graphemebreak.splitClusters( text ).slice( 0, clusterOffset - ).join( '' ).length; + return unicodeJS.graphemebreak.splitClusters( text ) + .slice( 0, clusterOffset ) + .join( '' ) + .length; }; /** @@ -442,8 +444,7 @@ * @returns {number} Grapheme cluster offset */ ve.getClusterOffset = function ( text, byteOffset ) { - return unicodeJS.graphemebreak.splitClusters( text.substring( 0, byteOffset - ) ).length; + return unicodeJS.graphemebreak.splitClusters( text.substring( 0, byteOffset ) ).length; }; /**