|
3fdb7d55
|
2019-09-02T20:08:04
|
|
Added support for AQL (#2025)
This adds support for the AQL language.
https://www.arangodb.com/docs/stable/aql/
|
|
8ccd258b
|
2019-09-02T13:15:40
|
|
Turtle: Minor improvements (#2038)
This makes a few minor improvements to Turtle:
- Multiline strings were too greedy and matched `"""a"""""` whole.
- URLs (IRI) were too accepting.
- The keyword patterns are now disjoint.
|
|
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.
|
|
3509f3e5
|
2019-08-29T16:37:13
|
|
Improved test page performance for Chromium (#2020)
This improves the performance of the test page for large chunks of text in Chromium-based browsers.
|
|
a7cf56b7
|
2019-08-29T16:25:02
|
|
Added suppprt for Zig (#2019)
This adds support for the Zig language.
https://ziglang.org/
|
|
d03d19b4
|
2019-08-29T16:22:03
|
|
Less: Fixed exponential backtracking (#2016)
This fixes the exponential backtracking in 2 of Less' patterns.
|
|
5b8a16d9
|
2019-08-29T16:15:05
|
|
Python: Fixed decorators (#2018)
This adds a missing multiline flag to support more than one decorator.
|
|
9f722586
|
2019-08-17T14:36:50
|
|
Added support for Firestore security rules (#2010)
This adds support for Google Cloud Firestore security rules.
|
|
ebe363f4
|
2019-08-17T14:31:41
|
|
CSS Extras & PHP: Fixed too greedy number token (#2009)
This fixes the too greedy number tokenization of CSS Extras which cause the placeholders of PHP (via markup templating) to be partly tokenized.
The CSS extras number pattern was adjusted to solve the issue.
|
|
e2b99f40
|
2019-08-14T11:40:43
|
|
Added support for GDScript (#2006)
This adds support for the GDScript language.
|
|
af5a36ae
|
2019-08-08T21:41:28
|
|
SAS: Fixed `proc-args` token by removing backreferences from string pattern (#2013)
Because the `proc-args` pattern has a lookbehind capturing group, the `\1` in the string pattern will refer to the lookbehind group. This PR fixes this bug by replacing the old string pattern with old that doesn't use backreferences.
|
|
076f6155
|
2019-08-08T15:16:31
|
|
SAS: Major improvements (#1981)
This makes various improvements to the SAS language definition such as adding support for embedded SQL, missing keyword and language elements, more granular tokenizing, and many more.
|
|
508d57ac
|
2019-08-06T15:30:24
|
|
Added RDF Turtle/TriG language (#2012)
This adds support for the RDF Turtle/TriG language.
|
|
7cb65eec
|
2019-08-05T13:16:32
|
|
Fixed alias example in extending page (#2011)
This fixes the example on how to add a language alias to a language definition.
|
|
3af5d744
|
2019-07-24T22:12:06
|
|
npm: Updated dependencies to fix 122 vulnerabilities (#1997)
This updates mocha and its dependencies to fix 122 vulnerabilities.
|
|
aba55105
|
2019-07-21T22:08:30
|
|
1.17.1
|
|
a09ca1bb
|
2019-07-21T22:08:11
|
|
Update CHANGELOG
|
|
c2229ec2
|
2019-07-21T22:07:17
|
|
Add .DS_Store to npmignore
Keeps these from being published.
|
|
a7030277
|
2019-07-21T22:05:51
|
|
1.17.0
|
|
fee59060
|
2019-07-21T22:05:42
|
|
Add date to CHANGELOG
|
|
b1852951
|
2019-07-22T04:01:07
|
|
Changelog for 1.17.0 (#1989)
|
|
05823e88
|
2019-07-22T02:07:42
|
|
Markdown: Added support for auto-loading code block languages (#1898)
This lets Markdown load embedded languages using the Autoloader plugin which now exposes the `loadLanguages` function.
This also changes `loadLanguages` to always invoke callbacks asynchronously and to invoke error callbacks only once.
|
|
e7702ae1
|
2019-07-22T01:27:48
|
|
Diff: Added support for syntax highlighting inside diff blocks (#1889)
This adds support for syntax highlighting inside diff blocks via a new plugin called: Diff Highlight.
|
|
c8844286
|
2019-07-21T22:59:46
|
|
Highlight JS tagged template literals (#1931)
This adds support for highlighting embedded languages in JavaScript tagged template literals.
|
|
452d5c7d
|
2019-07-21T20:06:02
|
|
Autoloader: Improved component path guessing (#1928)
This changes the behavior of how the Autoloader handles `data-autoloader-path` attributes and guesses the components path.
The CDN example on the front page was also updated.
|
|
f1e16c7b
|
2019-07-21T00:00:18
|
|
Added tutorial for using Prism.js with React (#1979)
|
|
cedb8e84
|
2019-07-20T13:07:52
|
|
Markdown: Added tables (#1848)
This adds support for Markdown tables and improves the matching of headers and code blocks.
|
|
a3a6d9ee
|
2019-07-20T12:59:11
|
|
Resolved conflict
|
|
8b5d67a3
|
2019-07-20T12:54:25
|
|
reST: Fixed exponential pattern (#1986)
This fixes the exponential backtracking of the second `link` pattern.
|
|
5d992fc5
|
2019-07-20T12:52:48
|
|
Added basic support for LilyPond (#1967)
This adds very basic support for LilyPond.
More advanced features weren't implemented because the author (me) has no idea about music.
|
|
c93c066b
|
2019-07-20T12:35:15
|
|
Added support for Splunk SPL (#1962)
This adds support for Splunk SPL and corrects the position of the SQL in `components.json`.
|
|
e8811d22
|
2019-07-20T03:18:01
|
|
Scheme: Added support for rational number literals (#1964)
This adds support for rational numbers like `2/3`.
|
|
033c5ad8
|
2019-07-19T16:20:45
|
|
gulp: Split gulpfile.js and expanded `changes` task (#1835)
This splits the `gulpfile.js` files into multiple files and expands the `changes` tasks to generate a commit-based changelog.
|
|
0dd44d53
|
2019-07-17T21:22:24
|
|
gulp: Use `async` functions & drop testing on Node v6 (#1783)
This refactors the `gulpfile.js` to use async/await for clearer code. It also drops testing for all NodeJS versions before NodeJS v8 because they don't support async/await.
|
|
bab744a6
|
2019-07-16T18:39:45
|
|
Update footer's GitHub repository URL and capitalisation of "GitHub" (#1983)
This updates the Prism repository linked to in the footer and corrects the capitalization of the name "GitHub".
|
|
bb84f98c
|
2019-07-15T23:22:20
|
|
Added support for DNS zone files (#1961)
This adds support for DNS zone files.
The highlighting is quite simple as every type and class is highlighted as `keyword`. This is intentional as other token names (e.g. `class-name`, `function`, `builtin`, ...) are not highlighted by every theme resulting in large portions of unstyled text for some themes.
|
|
7d056591
|
2019-07-15T22:59:33
|
|
Fixed typo in Funky theme (#1960)
The `.toke.variable` selector has been fixed to be `.token.variable`.
|
|
b9ec6fd8
|
2019-07-13T15:52:36
|
|
Markdown: Improved URLs (#1955)
This fixes the known issue that inline styles (bold, italic, strike) break URLs. Inline styles are now properly highlighted inside URLs.
|
|
d58d2aeb
|
2019-07-13T15:41:07
|
|
F#: Improved character literals (#1956)
This adds support for all F# character escapes which should result in all characters being highlighted as such.
The problem was that character literals with escape sequences longer than two characters were not recognized.
|
|
11f18e36
|
2019-07-13T15:06:09
|
|
Download page: Improved performance for Chromium-based browsers (#1907)
This significantly reduces the time it takes to highlight the code of Prism on the download page in Chromium-based browsers.
It does this by creating a new DOM node and highlighting the code in this detached node which seemingly helps Chromium to optimize its layout recalculations.
|
|
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.
|
|
4a2c90c1
|
2019-07-11T22:05:49
|
|
Visual Basic: Added support for interpolation strings (#1971)
This makes string like `$"Foo bar"` highlight with `$`.
|
|
858201c7
|
2019-07-10T21:45:22
|
|
Added support for PascaLIGO (#1947)
This adds support for the [PascaLIGO language](http://ligolang.org).
|
|
473f7fbd
|
2019-07-03T12:34:20
|
|
Added support for PC-Axis file format (#1940)
This adds a new language for the PC-Axis file format.
|
|
de10bd1d
|
2019-07-01T19:55:12
|
|
Protobuf improvements (#1948)
This makes numerous improvements to the Protobuf grammar adding (almost) full support for PB2 and PB3 syntax.
|
|
36a5fa0e
|
2019-06-30T04:19:54
|
|
Known failure page (#1876)
This PR adds a known failures page. This resolves #1750.
The known failures are moved from the example pages.
(I also updated all example pages with invalid HTML.)
Some known failures were actually fixed in the meantime but never updated, so I removed a few. Those were:
- Handlebars
- Markdown's nested bold-italic
- Smarty
- Textile's "Nested styles are only partially supported"
### Screenshot
<details>
![image](https://user-images.githubusercontent.com/20878432/56849438-7eca3200-68f4-11e9-9dc3-bf0256be8d1e.png)
</details>
|
|
a16d4a25
|
2019-06-30T03:59:48
|
|
Examples improvements (#1919)
This PR makes some improvements to the examples website:
1. `fileExists` will now also check local files, so that newly added examples can be viewed.
(Requires localhost)
1. `update` now uses `Prism.highlightAllUnder` instead of the self-constructed copy of it.
1. Some formatting.
|
|
922ec555
|
2019-06-30T03:54:26
|
|
Website: Added basic usage for CDNs (#1924)
Per [suggestion](https://github.com/PrismJS/prism/issues/1922#issuecomment-497681398) by @foxycode, I added an example for the usage of Prism with CDNs.
|
|
d673d701
|
2019-06-30T03:42:07
|
|
README: Added npm downloads badge (#1934)
This adds an npm downloads/week badge to Prism's readme which also links our npm page for a little extra promotion.
|
|
b19f512f
|
2019-06-30T03:20:40
|
|
Autoloader: Fixed and improved callbacks (#1935)
This PR fixes and improves the internal Autoloader callbacks.
### Bug
Callbacks were stored in `success_callbacks` and `error_callbacks` and not removed after execution meaning once added, a callback was executed every time the language for which the callback was added for was requested (either directly or as a dependency).
This bug wasn't very visible because of how the Autoloader is usually used. Usually, the Autoloader is used to load the languages for the static code in a page. This means that the Autoloader gets asked for a bunch of languages, loads them asynchronously and then executes the callbacks with this [line](https://github.com/PrismJS/prism/blob/d4373f3a282f4c09e4fb4dcbd8885c7848b61073/plugins/autoloader/prism-autoloader.js#L187) (`success` is [this](https://github.com/PrismJS/prism/blob/d4373f3a282f4c09e4fb4dcbd8885c7848b61073/plugins/autoloader/prism-autoloader.js#L306) function). Because it takes a little while until the language is loaded (certainly until the next tick), all callbacks will be registered before the `onload` of the script is called meaning that [this](https://github.com/PrismJS/prism/blob/d4373f3a282f4c09e4fb4dcbd8885c7848b61073/plugins/autoloader/prism-autoloader.js#L300) never gets executed.
Thus the bug doesn't show up. (And even if it does, the success callback is usually just a `Prism.highlightElement` call.)
I discovered this bug when I used Autoloader to highlight C like code and then after that was done (some ticks later), I used Autoloader to highlight JavaScript code. What followed was that the synchronously called callbacks caused a stack overflow. Just a bit of good ol' infinite recursion.
I could have also fixed it by deferring callbacks to the next tick but I decided to rework the callback structure because this change of behavior might break some code. Autoloader invokes the callbacks of already loaded languages (and failed ones) synchronously while all other callbacks are called asynchronously. This fix keeps this behavior.
(It's another question as to whether we should call all callbacks asynchronously. <sub><sup>Yes, we should IMO.</sup></sub>)
### Improvements
1. [This](https://github.com/PrismJS/prism/blob/d4373f3a282f4c09e4fb4dcbd8885c7848b61073/plugins/autoloader/prism-autoloader.js#L218) declaration and usage of `data` is completely unnecessary and was removed.
1. Typings for `lang_data`.
|
|
24c8e717
|
2019-06-30T00:11:14
|
|
Extending page: Fixed typo + new alias section (#1949)
|
|
b6543853
|
2019-06-30T00:00:14
|
|
Update website page styles to not interfere with themes (#1952)
This changes the `style.css` to not interfere with themes.
The problem was that `* { ...; font-weight: normal; }` caused markdowns bold text to not be rendered as bold.
<details>
<summary>Style inheritance</summary>
![image](https://user-images.githubusercontent.com/20878432/60092675-e90e2000-9747-11e9-8b16-73bf3e219001.png)
</details>
The fix is quite simple: I just removed the `font-weight: normal;` line. The only elements (besides the bold tokens) that changed were `h2`s, so they get a new rule. In a side-to-side comparison, I wasn't able to spot any other differences.
Result:
![image](https://user-images.githubusercontent.com/20878432/60092899-5e79f080-9748-11e9-955c-bd3645fc018e.png)
|
|
5ab28bbe
|
2019-06-25T12:29:20
|
|
Add className option for toolbar items (#1951)
Allows for passing in a className when registering a toolbar button to allow to target via CSS.
An example:
```js
Prism.plugins.toolbar.registerButton( 'my-button', {
text: 'My Button',
className: 'my-button',
});
```
This will add the span element `<span class="my-button">My Button</span>` .
|
|
6b4b2d2b
|
2019-06-25T03:13:29
|
|
Removed unnecessary `lookbehind: true`
|
|
5d191b92
|
2019-06-25T03:08:02
|
|
Download page: Fixed Edge's word wrap (#1920)
This makes the word break behavior consistent in all browsers.
|
|
e2c56f04
|
2019-06-24T23:11:51
|
|
Resolved conflicts
|
|
11903721
|
2019-06-24T22:44:18
|
|
Markdown: Added support for complexly nested bold and italic expressions
Some Markdown expressions which are both bold and italic (e.g. `***abc***`) were not correctly matched until now. This solves this issue.
|
|
84b9651b
|
2019-06-24T15:51:46
|
|
Rebuilt Prism
|
|
9c75843a
|
2019-06-24T15:48:11
|
|
Improved inline pattern creation + more comments
|
|
986c9de0
|
2019-06-24T15:43:49
|
|
More strike tests
|
|
235fce74
|
2019-06-24T14:47:41
|
|
Improved tests
|
|
f571cfce
|
2019-06-14T17:34:53
|
|
Perl: Added `return` to keywords.
|
|
b52a16b4
|
2019-06-14T16:30:13
|
|
Rebuild prism-perl.min.js
|
|
4a0ed18d
|
2019-06-14T16:13:46
|
|
Add new keyword to the keyword test file
|
|
2f39de97
|
2019-06-14T15:38:43
|
|
Add 'return' to recognised keywords
|
|
31fb8bc5
|
2019-06-12T15:50:04
|
|
Added support for Shell sessions
This adds support for a Shell session pseudo language.
|
|
0b48301e
|
2019-06-12T15:46:07
|
|
Resolved conflicts
|
|
6f53f749
|
2019-06-12T15:31:52
|
|
Added support for $$ equations (#1916)
|
|
3e181241
|
2019-06-12T15:28:44
|
|
Added more examples & small TOML improvement (#1917)
This adds some of the missing examples and makes a small improvement to TOML.
|
|
4b6b6e8b
|
2019-06-12T15:21:10
|
|
SCSS: Fixed exponential time failing of url pattern (#1938)
The url pattern used to fail in exponential time for some input strings. This fixes this issue.
|
|
feb1b6f5
|
2019-06-12T19:34:29
|
|
Add the 'struct' keyword to Julia (#1941)
Added to the key word list and updated tests.
|
|
363281b3
|
2019-06-10T13:29:03
|
|
Bash improvements (#1443)
A bunch for improvements for Bash.
|
|
c33cf459
|
2019-06-09T10:37:20
|
|
Resolved conflicts
|
|
d4373f3a
|
2019-06-08T23:50:11
|
|
gulp: JSON formatting for partly generated files (#1933)
This introduces better formatting for the generated JSON objects in the Autoloader and Show language plugins.
|
|
73d964be
|
2019-06-08T20:15:08
|
|
Added support for JQ language (#1896)
This adds support for the JQ language.
|
|
0853e694
|
2019-06-08T20:09:17
|
|
The test page now uses prism-core.js instead of prism.js (#1908)
Instead of `prism.js`, the test page will now use `prism-core.js`. This means that Markup, CSS, C like, and JS are not included by default which will cause them to behave like any other language.
|
|
3ba786cd
|
2019-06-02T15:08:24
|
|
Tests: `lookbehind` test for patterns (#1890)
This adds a test which whether `lookbehind` (if set to `true`) is necessary for a given pattern.
|
|
a8164559
|
2019-06-02T14:36:05
|
|
C#: Added `cs` alias (#1899)
|
|
0b1662dd
|
2019-06-01T18:24:44
|
|
Toolbar: Set opacity to 1 when focus is within (#1927)
This ensures interacting with the toolbar with the keyboard
makes it visible to the user.
|
|
79880197
|
2019-06-01T17:08:39
|
|
Copy to clipboard: Switch anchor to button (#1926)
This changes the anchor element into a button which fixes that the element is not tabbable.
|
|
ddf81233
|
2019-06-01T17:05:27
|
|
Docs: Added "Creating a new language definition" section (#1925)
This adds a new "Creating a new language definition" section explaining the workflow of creating a new lang. def..
|
|
2141129f
|
2019-05-28T23:07:39
|
|
Julia: Highlight ‘Inf’ and ‘NaN’ as constants (#1921)
This highlight `Inf`, `NaN` and all of their variants as constants.
|
|
feb3187f
|
2019-05-28T21:38:42
|
|
Julia: Add the ’in’ keyword (#1918)
Added the missing `in` keyword.
|
|
5ad58a75
|
2019-05-28T18:25:04
|
|
LaTeX: Added TeX and ConTeXt alias (#1915)
Added TeX and ConTeXt alias. Some minor formatting.
|
|
3de29e72
|
2019-05-28T14:23:02
|
|
C++: Fixed C++ number pattern (#1887)
|
|
d4736f08
|
2019-05-28T14:14:05
|
|
Added support for $$ equations
|
|
03cf85b0
|
2019-05-18T20:56:47
|
|
Added support for nested bold and italic tokens
|
|
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`.
|
|
96044979
|
2019-05-15T21:06:59
|
|
Added shell session language
|
|
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.
|
|
5e5a3e00
|
2019-05-12T14:14:03
|
|
CSS-Extras: Added `even` & `odd` keywords to `n-th` pattern (#1872)
`even` and `odd` are keywords which are also an `n-th` value. This adds it to the pattern which previously only captured values of the form `an+b`.
|
|
74050c68
|
2019-05-12T14:10:17
|
|
CSS: Removed useless flag and modifier (#1875)
This cleans up CSS' at-rule pattern.
|
|
f8ae465d
|
2019-05-12T14:07:58
|
|
JSONP Highlight: Fixed examples (#1877)
This fixes an example on the JSONP Highlight page.
|
|
acceb3b5
|
2019-05-08T17:02:27
|
|
Custom class: Added mapper functions for language specific transformations (#1873)
This adds support for mapper function to the `map` function, allowing for language-specific transformations.
|
|
632ce00c
|
2019-05-07T23:21:49
|
|
Line highlight: Batching DOM read/writes to avoid reflows (#1865)
This batches DOM read and write operation to avoid reflows resulting for better performance.
|
|
4faa3314
|
2019-05-07T20:09:47
|
|
Add async / await keywords for Rust. (#1882)
|
|
c24831b5
|
2019-04-27T11:28:47
|
|
Command line: Fix for uncaught errors for empty 'commandLine' object. (#1862)
This fixes the issue that the Command line plugin throws an error when the 'commandLine' object is not defined/an empty object. This always happens when an element with no text is highlighted.
|