Skip to content

Commit

Permalink
Update src/languages/d.js
Browse files Browse the repository at this point in the history
I found a problem running mocha. It was giving me the following error:
Error: global leaks detected: integer_re, float_re

I found out that it was a syntax problem that left integer_re and float_re without a "var" declaration, so they are defined in the global scope wich is a potential problem if you use the same name for other global variable.
  • Loading branch information
gimenete committed Aug 24, 2012
1 parent 86ff64c commit 9bdd028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/languages/d.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function(hljs) {
hexadecimal_float_re = '(0[xX](' +
hexadecimal_digits_re + '\\.' + hexadecimal_digits_re + '|'+
'\\.?' + hexadecimal_digits_re +
')[pP][+-]?' + decimal_integer_nosus_re + ')';
')[pP][+-]?' + decimal_integer_nosus_re + ')',

integer_re = '(' +
decimal_integer_re + '|' +
Expand Down

0 comments on commit 9bdd028

Please sign in to comment.