diff options
author | thatch <devnull@localhost> | 2008-09-24 18:11:15 -0700 |
---|---|---|
committer | thatch <devnull@localhost> | 2008-09-24 18:11:15 -0700 |
commit | 7bb05a8f531337813556cb5d8c82de1791b75dcc (patch) | |
tree | b7543b38ad9ec8291309d6adbf9d8fdd87e661aa /tests/examplefiles/regex.js | |
parent | 938060f2faccba4abbae4c298e93a537296cf89c (diff) | |
download | pygments-7bb05a8f531337813556cb5d8c82de1791b75dcc.tar.gz |
Make JavascriptLexer's regex detection a little smarter (#356)
Diffstat (limited to 'tests/examplefiles/regex.js')
-rw-r--r-- | tests/examplefiles/regex.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/examplefiles/regex.js b/tests/examplefiles/regex.js new file mode 100644 index 00000000..7790cb00 --- /dev/null +++ b/tests/examplefiles/regex.js @@ -0,0 +1,22 @@ +// regex + +blah(/abc/); +x = /abc/; +x = /abc/.match; + +// math + +blah(1/2); //comment +x = 1 / 2 / 3; +x = 1/1/.1; + +// broken + +x=/1/; +x=1/a/g; +x=a/a/g; + +// real-world + +var x = 1/(1+Math.sqrt(sum)); // convert to number between 1-0 +return Math.round((num / den) * 100)/100; |