mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
codemirro 5.48.4
This commit is contained in:
14
libraries/codemirror/mode/julia/julia.js
vendored
14
libraries/codemirror/mode/julia/julia.js
vendored
@@ -187,15 +187,13 @@ CodeMirror.defineMode("julia", function(config, parserConf) {
|
||||
var imMatcher = RegExp(/^im\b/);
|
||||
var numberLiteral = false;
|
||||
// Floats
|
||||
if (stream.match(/^\d*\.(?!\.)\d*([Eef][\+\-]?\d+)?/i)) { numberLiteral = true; }
|
||||
if (stream.match(/^\d+\.(?!\.)\d*/)) { numberLiteral = true; }
|
||||
if (stream.match(/^\.\d+/)) { numberLiteral = true; }
|
||||
if (stream.match(/^0x\.[0-9a-f]+p[\+\-]?\d+/i)) { numberLiteral = true; }
|
||||
if (stream.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)) { numberLiteral = true; }
|
||||
if (stream.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)) { numberLiteral = true; }
|
||||
// Integers
|
||||
if (stream.match(/^0x[0-9a-f]+/i)) { numberLiteral = true; } // Hex
|
||||
if (stream.match(/^0b[01]+/i)) { numberLiteral = true; } // Binary
|
||||
if (stream.match(/^0o[0-7]+/i)) { numberLiteral = true; } // Octal
|
||||
if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) { numberLiteral = true; } // Decimal
|
||||
if (stream.match(/^0x[0-9a-f_]+/i)) { numberLiteral = true; } // Hex
|
||||
if (stream.match(/^0b[01_]+/i)) { numberLiteral = true; } // Binary
|
||||
if (stream.match(/^0o[0-7_]+/i)) { numberLiteral = true; } // Octal
|
||||
if (stream.match(/^[1-9][_\d]*(e[\+\-]?\d+)?/)) { numberLiteral = true; } // Decimal
|
||||
// Zero by itself with no other piece of number.
|
||||
if (stream.match(/^0(?![\dx])/i)) { numberLiteral = true; }
|
||||
if (numberLiteral) {
|
||||
|
||||
Reference in New Issue
Block a user