From 91ec2c51718daa4f1fa9b182ff7ee469b113f5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 5 Feb 2016 16:08:31 +0100 Subject: [PATCH] fix eslint --- app/assets/javascripts/discourse/dialects/dialect.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/dialects/dialect.js b/app/assets/javascripts/discourse/dialects/dialect.js index f53bb58ca5f..7cf55dba26a 100644 --- a/app/assets/javascripts/discourse/dialects/dialect.js +++ b/app/assets/javascripts/discourse/dialects/dialect.js @@ -1,3 +1,5 @@ +/*eslint no-bitwise:0 */ + /** Discourse uses the Markdown.js as its main parser. `Discourse.Dialect` is the framework @@ -247,9 +249,9 @@ Discourse.Dialect = { d += performance.now(); //use high-precision timer if available } var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = (d + Math.random()*16)%16 | 0; + var r = (d + Math.random() * 16) % 16 | 0; d = Math.floor(d/16); - return (c=='x' ? r : (r&0x3|0x8)).toString(16); + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); }); return uuid; },