|
2cc4660b
|
2022-02-02T11:53:16
|
|
Core: Added better error message for missing grammars (#3311)
|
|
b631949a
|
2021-11-03T12:19:36
|
|
Core: Added `setLanguage` util function (#3167)
|
|
5a24cbff
|
2021-10-14T14:01:46
|
|
JS: Improved `number` pattern (#3149)
|
|
3b2238fa
|
2021-10-10T19:36:58
|
|
JS: Added properties (#3099)
|
|
d38592c5
|
2021-10-04T08:52:52
|
|
File highlight+data range (#1813)
Co-authored-by: atomize <63r71@tuta.io>
Co-authored-by: Michael Schmidt <mitchi5000.ms@googlemail.com>
|
|
a80a68ba
|
2021-10-02T01:29:28
|
|
Core: Fixed type error on null (#3057)
|
|
e2630d89
|
2021-09-26T11:52:18
|
|
ESLint: Added `regexp/sort-alternatives` rule (#3093)
|
|
213cf7be
|
2021-09-23T16:33:24
|
|
Core: Document `disableWorkerMessageHandler` (#3088)
Co-authored-by: Michael Schmidt <msrd0000@gmail.com>
|
|
52e8cee9
|
2021-09-15T20:03:41
|
|
Markup: Made most patterns greedy (#3065)
|
|
0ff371bb
|
2021-09-15T15:18:53
|
|
Markup: Fixed ReDoS (#3078)
|
|
4e9338ac
|
2021-08-27T18:41:39
|
|
ESLint: Added `regexp/no-super-linear-backtracking` rule (#3040)
|
|
e8d3b503
|
2021-06-27T14:56:07
|
|
ESLint: Added `regexp/strict` rule (#2944)
|
|
ab7c9953
|
2021-06-16T11:56:54
|
|
JS: Added support for import assertions (#2953)
|
|
18a00828
|
2021-06-13T19:53:03
|
|
ESLint: Added regexp plugin (#2924)
|
|
79d22182
|
2021-06-08T13:50:35
|
|
FIxed some cases of quadratic worst-case runtime (#2922)
|
|
415651a0
|
2021-05-24T14:40:10
|
|
JS: Added support for RegExp Match Indices (#2900)
|
|
74edb4e5
|
2021-05-14T12:40:12
|
|
ESLint: Added indent rule (#2881)
|
|
fd20dbe4
|
2021-05-01T14:53:38
|
|
ESLint: Added spacing rules (#2862)
|
|
cf7b0fd5
|
2021-05-01T14:40:00
|
|
ESLint: Added JSDoc plugin (#2869)
|
|
fbceba1f
|
2021-05-01T14:34:07
|
|
ESLint: Re-enable no-cond-assign rule (#2870)
|
|
67a86cf6
|
2021-04-18T16:13:48
|
|
ESLint: Added brace-style rule (#2865)
|
|
158011e4
|
2021-04-18T15:55:05
|
|
ESLint: Added wrap-iife rule (#2867)
|
|
b03e7eb0
|
2021-04-17T22:30:39
|
|
ESLint: Added semi rule (#2836)
|
|
9c610ae6
|
2021-03-28T18:55:07
|
|
JavaScript: Added hashbang and private getters/setters (#2815)
|
|
772d42be
|
2021-03-26T13:16:16
|
|
Added ESLint with minimal config (#2831)
|
|
53d34b22
|
2021-03-23T15:55:40
|
|
File Highlight: Fixed Prism check (#2827)
|
|
96335642
|
2021-03-21T17:22:54
|
|
Plugins: Consistent Prism check (#2788)
|
|
dbf70515
|
2021-03-21T16:58:13
|
|
Core: Add `tabindex` to code blocks to enable keyboard navigation (#2799)
|
|
8dbbbb35
|
2021-03-05T23:38:23
|
|
Markup: Added support for DOM event attributes (#2702)
|
|
970674cf
|
2021-03-05T23:23:17
|
|
Added support for plaintext (#2738)
|
|
022f90a0
|
2021-01-29T14:49:40
|
|
JavaScript: Improved contextual keywords (#2713)
|
|
b37987d3
|
2021-01-24T15:42:50
|
|
Core: Fixed greedy rematching reach bug (#2705)
|
|
0a3932fe
|
2020-12-30T17:43:57
|
|
C-like: Made all comments greedy (#2680)
|
|
e644178b
|
2020-12-28T18:19:11
|
|
Added test for polynomial backtracking (#2597)
|
|
8828500e
|
2020-12-22T10:54:55
|
|
Tests: Added strict checks for `Prism.languages.extend` (#2572)
|
|
24574406
|
2020-11-26T00:32:48
|
|
Core: Moved pattern matching + lookbehind logic into function (#2633)
|
|
8fa8dd24
|
2020-11-25T22:59:40
|
|
Core: Fixed bug with greedy matching (#2632)
|
|
3f4ae00d
|
2020-11-24T19:41:10
|
|
File Highlight: Fixed IE compatibility problem (#2656)
The File Highlight plugin used the `Element#matches` which isn't supported by IE11, so a small polyfill was added.
|
|
b04cbafe
|
2020-10-13T14:26:34
|
|
CSS: Better HTML `style` attribute tokenization (#2569)
|
|
f62ca787
|
2020-08-31T17:56:46
|
|
Regex: Changed how languages embed regexes (#2532)
|
|
206dc80f
|
2020-08-27T19:16:21
|
|
Docs: Minor improvement (#2513)
|
|
4f55052f
|
2020-07-18T14:53:05
|
|
JS: Improved regex detection (#2465)
|
|
40285203
|
2020-07-13T13:24:32
|
|
Core: Fixed greedy matching bug (#2032)
|
|
afea17d9
|
2020-06-28T02:32:53
|
|
File Highlight & JSONP Highlight update (#1974)
|
|
964de5a1
|
2020-06-28T01:44:00
|
|
CSS: Improved url and added keywords (#2432)
|
|
4ff555be
|
2020-06-28T01:34:29
|
|
Added JSDoc (#1782)
|
|
a36e96ab
|
2020-06-27T00:01:47
|
|
Added general de/activation mechanism for plugins (#2434)
Keep Markup, Line numbers, and Normalize whitespace now share the same per-element class-based de/activation logic.
|
|
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)
|
|
9c7bc820
|
2020-05-19T02:30:59
|
|
Markup: Added tokens inside DOCTYPE (#2349)
|
|
96a0116e
|
2020-05-19T01:59:40
|
|
Markup: Added `attr-equals` alias for the attribute `=` sign (#2350)
|
|
ab1e34ae
|
2020-05-19T01:53:44
|
|
Markup: Added alias for named entities (#2351)
|
|
9782cfe6
|
2020-05-18T02:29:27
|
|
Markup & JSON: Added new aliases (#2390)
This adds the `rss` and `atom` alias for Markup and the `webmanifest` alias for JSON.
|
|
eb70070d
|
2020-04-27T22:43:30
|
|
Added support for SSML (#2306)
|
|
7a554b5f
|
2020-04-16T22:27:54
|
|
Fixed several cases of exponential backtracking (#2268)
|
|
5d7aab56
|
2020-03-26T23:30:29
|
|
Updated all String.propotype.replace calls for literal strings
|
|
504a63ba
|
2020-03-26T23:18:33
|
|
CSS: Fixed url() containing "@" (#2272)
This fixes URLs that contain the "@" character.
|
|
2d4c94cd
|
2020-03-25T13:12:42
|
|
Core: Linked list implementation for matchGrammar (#1909)
The token streams in `matchGrammar` are now backed by a linked list instead of an array. This guarantees O(1) time for all operations.
The `matchGrammar` is now private.
|
|
f683972e
|
2020-02-19T12:26:45
|
|
Core: Faster Token.stringify (#2171)
This removes temporary arrays in `Token.stringify`.
All these changes make `Prism.highlight` about 10~23% faster.
|
|
2e0eff76
|
2020-02-07T16:44:48
|
|
CSS: Added support for the selector function (#2201)
This adds support for CSS 4's selector function. The selectors passed to the function will now be highlighted as such.
|
|
984e5d2e
|
2020-01-31T22:50:59
|
|
Core: Fixed scope problem in script mode (#2184)
A function in Core was defined inside an `if` which isn't allowed in JS strict mode.
|
|
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.
|
|
a7f70090
|
2019-12-02T14:10:53
|
|
Added new Filter highlightAll plugin (#2074)
This adds a new plugin to Prism which allows users to filter which elements will be highlighted by the `highlightAll` and `highlightAllUnder` methods.
|
|
0fd062d5
|
2019-11-01T22:31:17
|
|
Core: Fixed null reference (#2106)
The new defer logic in Prism Core did not handle that the script element might be null.
|
|
2108c60f
|
2019-10-25T17:34:50
|
|
Core: IE11 workaround for currentScript (#2104)
This adds a new function `Prism.util.currentScript` which is a functionally equalent to `document.currentScript` but includes support for IE11.
|
|
a3785ec9
|
2019-10-25T17:05:23
|
|
Core: Fixed race condition caused by deferring the script (#2103)
This fixes a race condition that can occur when deferring Prism components.
For more details see #2102.
|
|
99994c58
|
2019-10-19T14:35:23
|
|
Markup: Improved doctype pattern (#2094)
This changes Markup's `doctype` pattern to adhere to the XML spec more closely.
|
|
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.
|
|
7db0cab3
|
2019-10-16T11:26:18
|
|
Minor improvements for C-like and Clojure (#2064)
All changed patterns are equivalent with the exception of `c-like.class-name.pattern` where the `\b` before `catch` is new.
|
|
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`.
|
|
c6c62a69
|
2019-09-03T17:09:27
|
|
Made the download button its own plugin (#1840)
This makes the download button its own plugin instead of being part of File highlight.
|
|
d49f0f26
|
2019-09-03T16:40:02
|
|
Doubly check the `manual` flag (#1957)
This fixes the behavior of manual highlighting where it would highlight everything even with `manual: true`.
This also adds doc as to how manual highlighting works.
|
|
2d858e0a
|
2019-08-31T15:43:28
|
|
Core: Minor improvements (#1973)
This makes some minor improvements to Prism Core like refactoring and style clean up.
|
|
174ed103
|
2019-08-29T23:38:59
|
|
Core: Fixed greedy partial lookbehinds not working (#2030)
This fixes the bug that greedy patterns with a lookbehind group did not support other top-level alternatives (e.g. `/foo|(lookbehind)bar/`) causing an error when used.
|
|
e864d518
|
2019-08-29T23:24:17
|
|
Core: Fixed greedy targeting bug (#1932)
The `target` parameter defines the token which causes rematching. Rematching is done by recursively calling `matchGrammar` where `target` will be the current token name. The rematching is done if either a match was found or we reached the target token, whatever comes first.
The bug is that a token is identified by its name. But the name alone doesn't uniquely identify a token in a grammar because many tokens can have the same name (array).
This fixes this bug.
|
|
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).
|
|
9d9e2ca4
|
2019-07-11T16:28:49
|
|
Removed env.elements in 'before-highlightall' hook (#1968)
This removes the `env.elements` property from the environment of the `before-highlightall` hook.
**Why?**
- There is no plugin that is using it.
- It is inherently incompatible with `env.selector`. Even if a plugin using `elements` wanted to respect `selector` it would not be able to because 1) there might be plugins after it (in `before-highlightall`) extending the selector and 2) the plugin has no access to the current `container`.
**Isn't this a breaking change?**
Yes, but I don't think that this will have any impact for the above reasons and because from a user perspective, it's hard to use than just iteration over your elements and calling `Prism.highlightElement` yourself.
|
|
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`.
|
|
f0a10669
|
2019-05-15T13:41:05
|
|
CSS: Extended `url` inside (#1874)
This extends the highlighting of the CSS `url` pattern adding highlighting for punctuation and the `url` function.
|
|
74050c68
|
2019-05-12T14:10:17
|
|
CSS: Removed useless flag and modifier (#1875)
This cleans up CSS' at-rule pattern.
|
|
fd691c52
|
2019-04-23T00:33:15
|
|
Core: Made `language-none` the default language (#1858)
This makes `language-none` the default language of a highlighted element in the case that no `language-xxxx` class is provided or inherited.
|
|
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.
|
|
e2683959
|
2019-04-03T11:30:49
|
|
Javascript: Added missing semicolon (#1856)
|
|
65a4e894
|
2019-03-28T23:47:49
|
|
Removed `parent` from the `wrap` hook's environment (#1837)
This removes the `parent` property of the `wrap` hook and the parameter from `Token.stringify`.
|
|
f2d8e1c7
|
2019-03-14T15:03:11
|
|
JS: Keyword fix (#1808)
This fixes false positives with properties which have the same name as keywords.
|
|
11d0f75e
|
2019-03-14T13:17:45
|
|
Applied Array.isArray (#1804)
This replaces all occurrences of `Prism.util.type(variable) {!==, ===} 'Array'` with an equivalent `Array.isArray` expression.
|
|
af67c32e
|
2019-03-10T18:44:30
|
|
Markup `addInline` improvements (#1798)
This makes some minor improvements to the new `addInline` function of markup.
|
|
a2d445d0
|
2019-03-06T13:22:08
|
|
CSS: Selectors can contain any string (#1638)
This fixes that certain attribute value strings break the selector pattern.
|
|
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.
|
|
bac09f0a
|
2019-03-02T17:27:19
|
|
Made prism-core a little more editor friendly (#1776)
This makes the structure of prism-core easier to understand for editors.
|
|
b06f532f
|
2019-03-01T01:19:29
|
|
Core: Avoid redeclaring variables in util.clone (#1778)
This changes util.clone to be more readable and to avoid redeclaring the `clone` and `id` variables.
|
|
152a68ef
|
2019-02-28T21:36:57
|
|
Improved languages.DFS and util.clone (#1506)
Minor improvements for the two functions.
|
|
3560c643
|
2019-02-28T20:12:11
|
|
JS: Fixed variables named "async" (#1738)
Fixes variables names "async" in JS.
|
|
c3862a24
|
2019-02-28T19:55:24
|
|
Fix for markup attributes (#1752)
This fixes some issues related to markup (XML/HTML) attributes. See the PR for more detail.
|
|
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`.
|