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; },