diff --git a/autotests/folding/example.rmd.fold b/autotests/folding/example.rmd.fold
--- a/autotests/folding/example.rmd.fold
+++ b/autotests/folding/example.rmd.fold
@@ -1,15 +1,15 @@
---
-title: "test"
-author: "me"
-date: "07.10.2014"
+title: "test"
+author: "me"
+date: "07.10.2014"
output: html_document
---
This is a simple test document. It shows syntax highlighting switches between YAML (above), R blocks
```{r, echo=FALSE}
-for (i in 1:10) {
+for (i in 1:10) {
if(i>=10) print(i)
-}
+}
# two blank lines below
sessionInfo()
diff --git a/autotests/folding/highlight.js.fold b/autotests/folding/highlight.js.fold
--- a/autotests/folding/highlight.js.fold
+++ b/autotests/folding/highlight.js.fold
@@ -1,18 +1,18 @@
-/* test.js - test for javascript.xml syntax file */
+/* test.js - test for javascript.xml syntax file */
// Note: this script will not, and is not supposed to, compile in any js engine.
-/*
+/*
NOTE: The words "todo", "fixme" and "note" should be rendered in a different style
within comments, match should be caseless (to test for regexp insensitive attribute).
- The regex used for this rule is */
+ The regex used for this rule is */
String = /\b(?:fixme|todo|note)\b/
- /* Thus, for example "Notebook" is not caught by
+ /* Thus, for example "Notebook" is not caught by
this rule. (the "?:" in the subpattern is there to avoid the regex engine wasting time
saving a backref, which is not used for anything. I do not know if the overhead of parsing
that is greater than the time saved by not capturing the text...)
The rule for catching these words is placed in a context "Comment common", which is used
by both comment contexts (single line, multiline) using the new "IncludeRules" item.
-*/
+*/
// test if regex support works - nice with new fallthrough prop in context:)
somestring.replace( /dooh/ , "bah!");
@@ -33,15 +33,15 @@
re = //;
re = /a|b/;
-/*
+/*
Tests for the regex parser.
It will parse classes, quanitfiers, special characters and regex operaters,
as specified in the netscape documentation for javascript.
Regexps are only parsed in their clean form, as the RegExp(string) constructor
is using a quoted string.
TODO: Find out if more regex feats should be supported.
Consider using more itemDatas - assertion, quantifier are options.
-*/
+*/
re = /^text\s+\d+\s*$/;
re = /a pattern with caret \(^\) in it/;
@@ -58,15 +58,15 @@
var p = />/
// a test if #pop back from a comment will work
-re = /*/foo/*/ /bar/;
+re = /*/foo/*/ /bar/;
// ^ POP
// ^ we got back after pop in comment, if there is regexp attribs here :-)
-/*
+/*
Some tests if the fallthrough works.
The fallthrough happens if a regexp is not found in a possible (!) position,
which is after "search(" or "replace(" or "=" or "?" or ":" in version 0.1 of the xml file
-*/
+*/
var foo = 'bar';
// ^ fallthrough!
@@ -77,11 +77,11 @@
something.method =
- function ( a, b, c ) { /* ... */ }
+ function ( a, b, c ) { /* ... */ }
// ^ fallthrough ?!
something.other =
-function ( d, e, f ) { /* ... */ }
+function ( d, e, f ) { /* ... */ }
// fallthrough expected at col 0 ("function" should be bold)
var ary = new Array(5);
@@ -98,9 +98,9 @@
// guess...
-/*
+/*
Normal program flow...
-*/
+*/
if (something)
dostuff();
@@ -137,3 +137,25 @@
default:
break;
}
+
+// Numerics
+var a = 0xA;
+var b = 0b1;
+var c = 0o7;
+var d = 1.1E+3;
+var e = 1.E+3;
+var f = .1E+3;
+var g = 1E+3;
+var h = 1.1;
+var i = 1.;
+var j = .1;
+var k = 1;
+// Bigint
+const binBig = 0b101n;
+const octBig = 0o567n;
+const hexBig = 0xC0Bn;
+const decBig = 123n;
+// Invalid numbers
+var l = 0xA1t;
+var m = 0b0123;
+var n = 0o29;
diff --git a/autotests/folding/highlight.jsp.fold b/autotests/folding/highlight.jsp.fold
--- a/autotests/folding/highlight.jsp.fold
+++ b/autotests/folding/highlight.jsp.fold
@@ -89,22 +89,22 @@
<%-- Display our list of random Integers (shows code folding). --%>
<%
- if (intList != null && intList.size() > 0) {
+ if (intList != null && intList.size() > 0) {
%>
Here are the elements of intList... |
<%
Iterator intListIt = intList.iterator();
- while (intListIt.hasNext()) {
+ while (intListIt.hasNext()) {
Integer i = (Integer) intListIt.next();
%>
<%=i.toString()%> |
<%
- }
- } else {
+ }
+ } else {
%>
Oooops, we forgot to initialize intList! |
<%
- }
+ }
%>
@@ -142,7 +142,7 @@