We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 854ee51 commit 638abdaCopy full SHA for 638abda
mode/go/go.js
@@ -46,11 +46,11 @@ CodeMirror.defineMode("go", function(config) {
46
}
47
if (/[\d\.]/.test(ch)) {
48
if (ch == ".") {
49
- stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/);
+ stream.match(/^[0-9_]+([eE][\-+]?[0-9_]+)?/);
50
} else if (ch == "0") {
51
- stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);
+ stream.match(/^[xX][0-9a-fA-F_]+/) || stream.match(/^[0-7_]+/);
52
} else {
53
- stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/);
+ stream.match(/^[0-9_]*\.?[0-9_]*([eE][\-+]?[0-9_]+)?/);
54
55
return "number";
56
0 commit comments