|
ed715158
|
2020-05-29T16:24:07
|
|
JS: Improved `get`/`set` and parameter detection (#2387)
|
|
b28f21b7
|
2020-05-29T16:17:03
|
|
JS: Added support for logical assignment operators (#2378)
|
|
7a554b5f
|
2020-04-16T22:27:54
|
|
Fixed several cases of exponential backtracking (#2268)
|
|
1f3f8929
|
2020-01-05T20:11:53
|
|
JS: Added support for keywords after a spread operator (#2148)
This PR fixes that keywords after a spread operator weren't highlighted. This is mainly for the `await` and `new` keywords.
|
|
a23d8f84
|
2020-01-05T18:34:45
|
|
JS: Better regex detection (#2158)
This improves the detection of regular expressions.
|
|
c187e229
|
2019-10-16T12:06:22
|
|
Added test for unused capturing groups (#1996)
This adds a test that checks for unused capturing groups in patterns and another test which ensures that lookbehind groups are always the first thing being matched in a pattern.
|
|
fdb7de0d
|
2019-10-16T10:58:39
|
|
JavaScript: Added Optional Chaining and Nullish Coalescing (#2084)
This adds support for optional chaining (`?.`) and nullish coalescing (`??`).
|
|
0e5c48d1
|
2019-09-30T21:09:34
|
|
JS: Tokenize `:` as an operator (#2073)
This changes the JS tokenization of `:` (colon) to `operator`.
|
|
c8844286
|
2019-07-21T22:59:46
|
|
Highlight JS tagged template literals (#1931)
This adds support for highlighting embedded languages in JavaScript tagged template literals.
|
|
7bd08327
|
2019-07-13T13:42:13
|
|
JavaScript: Private fields (#1950)
This adds support for private fields in both JS and JS Extras.
[Proposal](https://github.com/tc39/proposal-class-fields#private-fields).
|
|
6068bf18
|
2019-05-18T17:57:47
|
|
JS: Added support for numeric separators (#1895)
This adds support for JavaScript's new numeric separators. E.g. `123_456`.
|
|
c13d6e7d
|
2019-04-19T22:07:57
|
|
JS: Template strings: Increased bracket count of interpolations (#1845)
This increases the number of nested braces which can be matched by JS's template pattern to supported nested objects within interpolation expressions.
|
|
9e164935
|
2019-04-19T21:56:52
|
|
Added support for `s` regex flag (#1846)
This adds support for the ES2018 `s` (dotall) flag for regular expressions.
|
|
f2d8e1c7
|
2019-03-14T15:03:11
|
|
JS: Keyword fix (#1808)
This fixes false positives with properties which have the same name as keywords.
|
|
3e00bb9c
|
2019-03-07T15:22:30
|
|
Rebuilt Prism (#1794)
This is a rebuilt of Prism to update minified files.
|
|
57127701
|
2019-03-04T23:12:46
|
|
Markup: Added support for CSS and JS inside of CDATAs (#1660)
This adds support for CSS/JS inside of (any number of) CDATAs.
|
|
3560c643
|
2019-02-28T20:12:11
|
|
JS: Fixed variables named "async" (#1738)
Fixes variables names "async" in JS.
|
|
7bcec584
|
2019-02-28T19:41:00
|
|
Improved JS constant pattern (#1737)
This changes the JS constant pattern so that all WebGL constants (like `FLOAT_MAT2x4`) are matched.
|
|
8378ac83
|
2019-02-28T19:33:50
|
|
Improved JS function pattern (#1736)
Allows for spaces around the punctuations of function invocation via `apply`, `bind`, or `call`.
|
|
bfbea4d6
|
2019-02-15T16:51:54
|
|
Fix `function-variable` in JS (#1739)
|
|
d9fa29a8
|
2019-02-15T16:03:59
|
|
Make `undefined` a keyword in JS (#1740)
|
|
57a92035
|
2019-02-12T20:43:31
|
|
Improved JavaScript parameter recognization (#1722)
- The first letter of a parameter can now be upper case.
- Fixes too greedy regex by introducing recursive expressions.
|
|
0cc8c56a
|
2018-12-03T20:52:13
|
|
Identify JavaScript function parameters (#1446)
Support parameters for these types of functions:
```javascript
// es6 class method
foo(x, y) {}
// es6 arrow function
(x, y) => x
x => x
// es5 function
function foo(x, y) {}
// es5 anonymous function
function (x, y) {}
```
|
|
2a4758ab
|
2018-12-01T21:44:57
|
|
Improve regex detection in JS (#1473)
The pattern for regular expressions in JS now also matches empty character
sets and it handles expressions like `/[\]/]/` now correctly.
|
|
a47c05ad
|
2018-08-28T05:39:08
|
|
Fixed lowercase supposed class names (#1544)
This PR fixes a bug with supposed class names.
Lowercase supposed class names are no longer highlighted.
**Before**:
![before](https://user-images.githubusercontent.com/20878432/44656379-e7c17900-a9f8-11e8-8b1a-7f1dd694263e.png)
**After**:
![after](https://user-images.github
usercontent.com/20878432/44656379-e7c17900-a9f8-11e8-8b1a-7f1dd694263e.png)
|
|
2b62e57b
|
2018-08-23T22:20:26
|
|
Added support for JS BigInt literals (#1542)
Add support for BigInt literals to JS and languages extending or including JS.
|
|
c40f6047
|
2018-08-19T20:28:57
|
|
Highlighting of supposed classes and functions (#1482)
Fixes #1471.
It also extends function-variable to include object properties.
e.g.
```js
{foo: function() {}}
```
|
|
ebd1b9a6
|
2018-08-19T16:06:34
|
|
Fix regex for `catch` and `finally` (#1527)
When called as methods on a promise chain, the current regex
would mark `catch` and `finally` as keywords. This regex improvement
ensures they're only caught as part of a `try / catch` block, and are
marked as functions as part of the promise chain.
|
|
9dfec340
|
2018-08-18T22:04:51
|
|
`insertBefore` now correctly updates references (#1531)
Removes some workarounds for misplacing the reference when using `insertBefore`.
|
|
db2d0ebb
|
2018-04-22T15:12:28
|
|
JavaScript: Add support for one level of nesting inside template strings. Fix #1397
|
|
5b043cf8
|
2018-04-13T08:59:26
|
|
JavaScript: Improve Regexp pattern
|
|
172d351a
|
2018-03-26T20:11:41
|
|
JavaScript: Improve Regex matching
|
|
9084481f
|
2018-03-26T09:17:05
|
|
JavaScript: Add support for constants. Fix #1348
|
|
12c0b20a
|
2018-03-08T22:19:01
|
|
Decouple minus sign from number pattern in most languages. Close #1110
|
|
7dc1e453
|
2017-12-05T08:58:11
|
|
CSS and JS: Make CSS and JS inclusions in Markup greedy. Fix #1240
|
|
de6de454
|
2017-11-21T09:20:11
|
|
Optimize more Unicode regexes (#1229)
In previous commit, #1227, a “function” regex JavaScript definition was updated. The same regex is used in few more points, and this PR optimizes them too.
Tests are ran and passed.
|
|
f234ea40
|
2017-11-20T23:34:38
|
|
Unicode characters in CSS properties (#1227)
* Unicode characters in CSS properties
Highlight Unicode characters in CSS properties correctly, for example “.foo { --bär: 3 }”.
Optimized the “function” regex in the JavaScript definition: replaced “_a-zA-Z0-9” with “\w”, removed uppercase “A-Z” because the “i” flag is set.
Used that regex for CSS but removed “$” and added “-”.
* Add a test
* Add minified versions
* Update prism.js
* Revert "Update prism.js"
This reverts commit 241464ba1ba5e350b8483d926e73364f9e9d99c4.
* Update prism.js too
|
|
93d4002c
|
2017-10-22T14:46:33
|
|
JavaScript: Regexp optimisation + don't use captures if not needed
|
|
8ee2cd38
|
2017-10-10T08:35:13
|
|
JavaScript: Better highlighting of functions (#1190)
|
|
ac09e975
|
2017-07-11T08:13:50
|
|
JavaScript: Reduced backtracking in regex pattern. Fix #1159
|
|
16ce4b33
|
2017-07-05T19:55:44
|
|
Run gulp
|
|
65cbaa95
|
2017-05-08T13:27:57
|
|
Run gulp after #1107
|
|
9f649fbe
|
2017-05-08T12:05:35
|
|
JavaScript: Properly match every operator as a whole token. Fix #1133
|
|
8de64b6b
|
2016-07-03T02:32:02
|
|
Run gulp
|
|
1158e460
|
2016-06-03T11:34:01
|
|
Rearrange the `string` and `template-string` token in JavaScript
It is more likely that single and double quotes appear in
a template string, than backticks in a normal string. Fixes issue
#963.
|
|
49cf8991
|
2016-03-08T15:03:59
|
|
Fix minor bug with new greedy-feature
This fixes a minor bug that causes invalid highlighting in some
edge cases, where two greedy patterns overlap each other.
|
|
2705c509
|
2015-09-24T19:36:10
|
|
Partial solution for the "Comment-like substrings"-problem
This patch introduces a new attribute called `greedy`. The
attribute is a simple boolean flag. If there is no match
for a greedy pattern it can concatenate the next two tokens
into a single string and try to match on this string again.
If a match is found on the second attempt, then the old tokens are
deleted and replaced by the new match.
This solves the "Comment-like substrings"-problem for exactly one
comment at very little cost. With this patch the following code is
highlighted correctly:
"foo /* bar */ baz"; "foo // bar";
/lala"test"sdf/;
This approach fails if there are more than one comments inside the
string:
"foo /* bar */ baz /* bar */ baz";
Signed-off-by: Andreas Rohner <andreas.rohner@gmx.net>
|
|
ab65be27
|
2016-02-12T21:32:19
|
|
Fix catastrophic backtracking regex issues
|
|
d7faf2cb
|
2015-10-26T08:15:40
|
|
Run gulp
|
|
e135947c
|
2015-10-10T12:48:04
|
|
Run gulp and update tests after #801 merge
|
|
29643f4e
|
2015-10-06T08:48:21
|
|
Simplify patterns for <style> and <script> tags
|
|
2f9fe1ef
|
2015-09-03T23:39:16
|
|
Added some language aliases.
|
|
29e26dc3
|
2015-09-03T23:14:19
|
|
JavaScript: Allow for all non-ASCII characters in function names. Fix #400
|
|
8be7815b
|
2015-07-01T18:50:02
|
|
Run gulp task
|
|
a7064dd4
|
2015-06-20T20:07:37
|
|
Moved up JS strings before template strings as they are far more common
|
|
476cbf42
|
2015-06-20T20:06:39
|
|
Improved regex performance of C-like strings and JS regexps
|
|
a8aa0588
|
2015-06-14T18:18:37
|
|
Implemented support for octal and binary numbers in javascript
They are supported from ES6+
|
|
04f72b14
|
2015-06-14T18:26:16
|
|
ES6: Template strings + interpolation
|
|
ca68b876
|
2015-06-14T00:53:20
|
|
Added support for missing ES6 keywords in JavaScript
|
|
5d99957a
|
2015-06-14T00:48:06
|
|
Added support for 'y' and 'u' ES6 JavaScript regex flags
|
|
b1fd5bdc
|
2015-03-10T08:27:53
|
|
Removed unused global flag in all grammars
|
|
91bb0bb1
|
2014-12-20T19:37:26
|
|
Run gulp
|
|
3154f9b9
|
2014-11-15T19:09:40
|
|
Move invalid alias declarations, which cause HTML highlighting to fail
The alias declarations in prism-javascript.js and prism-css.js are in
the wrong place and must be moved inside of the pattern object.
Otherwise they get injected into the markup grammar. The execution
fails, because the alias is a string and not a RegExp.
|
|
23edcc8c
|
2014-11-14T20:10:05
|
|
Added language-xxx aliases in nested language refs to ease styling
|
|
4247baec
|
2014-07-28T16:54:50
|
|
Fix conflicts.
|
|
af7a42a4
|
2014-07-10T19:25:02
|
|
Updated minified versions
|
|
d27b693f
|
2014-06-01T17:18:03
|
|
Updated keywords in JavaScript definition
* Sort keywords alphabetically (to ease maintenance)
* Added all missing keywords
* Added ECMAScript 5 keywords
* Added true/false/null as explicit keywords
Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Reserved_Words
Fixes #270
|
|
7cfd29a9
|
2014-05-26T11:20:55
|
|
Rebuild minified files.
|
|
d44312b6
|
2014-05-24T14:25:49
|
|
Converted the CSS, SCSS and JS grammars according to #258
|
|
36471491
|
2014-04-21T13:36:32
|
|
Updated minified files
|
|
6e3e5bab
|
2014-02-27T20:25:09
|
|
Added get/set to JS keywords
|
|
3c9155e6
|
2013-08-04T10:52:21
|
|
Added throw keyword to c-like and javascript
|
|
edb0f128
|
2012-12-17T09:03:32
|
|
Also changed the 2 corresponding files in /components.
|
|
1cdfcb84
|
2012-11-11T04:25:56
|
|
Fixed #37
|
|
1b40db97
|
2012-11-10T00:23:33
|
|
Made Java & JavaScript inherit from a generic C-style language definition; Added methods for language definition inheritance; Added simple dependency management in downloader
|
|
e95a85c0
|
2012-07-31T16:17:53
|
|
Merged the comment and line-comment tokens
|
|
c8795ed1
|
2012-07-31T12:25:32
|
|
Improved regex matching, docs updates
|
|
9eeeb7c6
|
2012-07-29T01:03:05
|
|
Moved inline CSS & JS to their language definitions
|
|
27ffa5b0
|
2012-07-27T03:24:09
|
|
Fixed serious highlighting bug, reduced known failures from 3 to 1
|
|
bd4e8d15
|
2012-07-23T18:54:30
|
|
ALL THE THINGS! Most notably: Simple templating, API changes, show invisibles plugin, download (build) page
|
|
a4b9b918
|
2012-07-18T15:57:08
|
|
Added minified versions
|