Log

Author Commit Date CI Message
Simran 717ace02 2019-10-15T16:03:54 AQL: Disallow unclosed multiline comments again (#2089) This reverts commit f3c6ba590345b140a2306903a5396e28187466eb.
Christian Ivicevic c8b48b9f 2019-10-13T22:28:29 TypeScript: Added missing keyword `undefined` (#2088) This adds `undefined` to the list of keywords in TypeScript.
cedporter 07020c7a 2019-10-07T08:39:40 SAS: Minor improvements (#2085) * Reorder comment array to fix edge case added to comment_feature.test * Adjust datalines to allow for possible preceding spaces before the closing semicolon * Move comment in SAS object for correct syntax matching precedence * Add several more keywords
Golmote 5d07aa7c 2019-10-05T13:53:01 Added @mAAdhaTTah and @RunDevelopment to credits and footer
Michael Schmidt 0e5c48d1 2019-09-30T21:09:34 JS: Tokenize `:` as an operator (#2073) This changes the JS tokenization of `:` (colon) to `operator`.
Michael Schmidt cdfa60ac 2019-09-30T19:43:33 Added plugin descriptions to plugin list (#2076) This adds plugin descriptions to the plugin lists on the website.
Michael Schmidt 53f07b1b 2019-09-26T16:46:43 Issue template improvements (#2069) This fixes a typo in the issue templates and comments out some instruction to make them invisible in the issue.
Sooheon Kim 8ea685b8 2019-09-25T18:52:28 Clojure: Added multiline strings (lisp style) (#2061) This adds support for linebreaks in Clojure strings.
Michael Schmidt a7b95dd3 2019-09-24T17:38:09 Added support for syntax in Java 13 (#2060) This adds support for the new `yield` keyword and text blocks (triple quoted strings) which are both introduced in Java 13.
Simran 007c9af4 2019-09-18T18:32:47 Tests: Simplified error message format (#2056) The error messages will now only contain the actual token stream the failed test and a full path of the test file plus the line and column number of the position of the first difference between the expected token stream and the actual token stream.
Simran f3c6ba59 2019-09-18T14:57:34 AQL: Allow unclosed multi-line comments (#2058) AQL does not require multi-line comments to be closed. ArangoDB simply treats everything until the end of the query string as a comment in that case. This PR adjusts Prism to highlight such comments correctly.
Simran 899574eb 2019-09-16T18:12:48 AQL: More pseudo keywords (#2055) This adds `COUNT`, `CURRENT`, `KEEP`, and `PRUNE` to the list of keywords such that false positives are (mostly) avoided.
Simran 32a4c422 2019-09-12T21:40:54 AQL: Added missing keyword + minor improvements (#2047) This adds 5 missing keywords, fixes the operator pattern to support the array concatenation operator properly, and makes the number pattern stricter.
Michael Schmidt 1af89e06 2019-09-10T13:38:22 Added .github folder to npm ignore (#2052) This adds the `.github` folder to `.npmignore` to exclude the directory from future releases.
Christian Oliff 6cd0738a 2019-09-06T01:19:56 Readme: Links now use HTTPS if available (#2045) This changes some link of our README to use HTTPS wherever possible.
Christian Oliff 8bcc1b85 2019-09-06T00:31:20 Website: Use HTTPS link to alistapart.com (#2044) This changes the link to alistapart.com to use HTTPS.
thomasdegroot18 c42f877d 2019-09-05T17:28:28 Added support for SPARQL language (#2033) This adds support for the SPARQL language. https://www.w3.org/TR/sparql11-query/
Ben Coman 1aabcd17 2019-09-05T00:10:59 Smalltalk: Fixed single quote character literal (#2041) This fixes the incorrect tokenization of the character literals of single quotes which were recognized as string delimiters.
Michael Schmidt 365faade 2019-09-04T16:53:47 New Match Braces plugin (#1944) This adds a new plugin to highlight matching braces in highlighted code.
Michael Schmidt 56a8711c 2019-09-03T20:52:15 Website: Fixed the Toolbar plusing's overflow issue (#1966) This fixes the overflow issue of all Toolbar related plugins where some button were hidden behind the theme selection.
Michael Schmidt 8403e453 2019-09-03T19:06:15 Added Inline color plugin (#2007) This adds a new plugin to display an inline preview of CSS colors as most IDEs do.
Michael Schmidt 010a0157 2019-09-03T17:45:53 D: Fixed strings (#2029) * Fixed D strings * Rebuilt
Michael Schmidt 8a572af5 2019-09-03T17:43:51 Website: FAQ update (#1977) This removes the little script to show all tokens of a language and replaces it with a little UI to do the task on the Prism website.
Michael Schmidt 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.
Tim Düsterhus 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.
Michael Schmidt f7eaa618 2019-09-03T12:56:20 Added Robot Framework plain text format (#2034) This adds support for the Robot Framework plain text space separated format. https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#plain-text-format
Michael Schmidt 3fda5c95 2019-09-03T12:49:58 Added test for nice names (#1911) This adds a test which requires every token name to match a strict pattern to avoid inconsistent naming styles.
Michael Schmidt 5c68a556 2019-09-03T12:34:16 Use modern JavaScript in the NodeJS usage section (#1942) This updates the code examples in the NodeJS usage section to use modern JavaScript (ES6) features.
Michael Schmidt cc2cf3f7 2019-09-02T20:29:26 Added support for Solidity (#2031) This adds support for the Solidity language. https://solidity.readthedocs.io/en/v0.4.23/
Michael Schmidt fb618331 2019-09-02T20:22:18 Groovy: Minor improvements (#2036) This makes some minor improvements to the Groovy language definition. - Triple quoted strings now support backslash escapes - A single `.` will now be highlighted as `punctuation` instead of `operator` to be consistent with other languages.
Michael Schmidt 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/
Michael Schmidt 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.
Michael Schmidt 2d858e0a 2019-08-31T15:43:28 Core: Minor improvements (#1973) This makes some minor improvements to Prism Core like refactoring and style clean up.
Michael Schmidt 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.
Michael Schmidt 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.
Michael Schmidt 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.
Michael Schmidt a7cf56b7 2019-08-29T16:25:02 Added suppprt for Zig (#2019) This adds support for the Zig language. https://ziglang.org/
Michael Schmidt d03d19b4 2019-08-29T16:22:03 Less: Fixed exponential backtracking (#2016) This fixes the exponential backtracking in 2 of Less' patterns.
Michael Schmidt 5b8a16d9 2019-08-29T16:15:05 Python: Fixed decorators (#2018) This adds a missing multiline flag to support more than one decorator.
Michael Schmidt 9f722586 2019-08-17T14:36:50 Added support for Firestore security rules (#2010) This adds support for Google Cloud Firestore security rules.
Michael Schmidt 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.
Michael Schmidt e2b99f40 2019-08-14T11:40:43 Added support for GDScript (#2006) This adds support for the GDScript language.
Michael Schmidt 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.
cedporter 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.
Jakub Klímek 508d57ac 2019-08-06T15:30:24 Added RDF Turtle/TriG language (#2012) This adds support for the RDF Turtle/TriG language.
Jakub Klímek 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.
Michael Schmidt 3af5d744 2019-07-24T22:12:06 npm: Updated dependencies to fix 122 vulnerabilities (#1997) This updates mocha and its dependencies to fix 122 vulnerabilities.
mAAdhaTTah aba55105 2019-07-21T22:08:30 1.17.1
mAAdhaTTah a09ca1bb 2019-07-21T22:08:11 Update CHANGELOG
mAAdhaTTah c2229ec2 2019-07-21T22:07:17 Add .DS_Store to npmignore Keeps these from being published.
mAAdhaTTah a7030277 2019-07-21T22:05:51 1.17.0
mAAdhaTTah fee59060 2019-07-21T22:05:42 Add date to CHANGELOG
Michael Schmidt b1852951 2019-07-22T04:01:07 Changelog for 1.17.0 (#1989)
Michael Schmidt 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.
Michael Schmidt 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.
Michael Schmidt c8844286 2019-07-21T22:59:46 Highlight JS tagged template literals (#1931) This adds support for highlighting embedded languages in JavaScript tagged template literals.
Michael Schmidt 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.
realfresh f1e16c7b 2019-07-21T00:00:18 Added tutorial for using Prism.js with React (#1979)
Michael Schmidt 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.
RunDevelopment a3a6d9ee 2019-07-20T12:59:11 Resolved conflict
Michael Schmidt 8b5d67a3 2019-07-20T12:54:25 reST: Fixed exponential pattern (#1986) This fixes the exponential backtracking of the second `link` pattern.
Michael Schmidt 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.
Michael Schmidt 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`.
Michael Schmidt e8811d22 2019-07-20T03:18:01 Scheme: Added support for rational number literals (#1964) This adds support for rational numbers like `2/3`.
Michael Schmidt 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.
ExE Boss 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.
Christian Oliff 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".
Michael Schmidt 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.
Michael Schmidt 7d056591 2019-07-15T22:59:33 Fixed typo in Funky theme (#1960) The `.toke.variable` selector has been fixed to be `.token.variable`.
Michael Schmidt 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.
Michael Schmidt 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.
Michael Schmidt 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.
Michael Schmidt 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).
Michael Schmidt 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.
dovisutu 4a2c90c1 2019-07-11T22:05:49 Visual Basic: Added support for interpolation strings (#1971) This makes string like `$"Foo bar"` highlight with `$`.
Brice Aldrich 858201c7 2019-07-10T21:45:22 Added support for PascaLIGO (#1947) This adds support for the [PascaLIGO language](http://ligolang.org).
Michael Schmidt 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.
Michael Schmidt 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.
Michael Schmidt 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>
Michael Schmidt 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.
Michael Schmidt 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.
Michael Schmidt 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.
Michael Schmidt 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`.
Michael Schmidt 24c8e717 2019-06-30T00:11:14 Extending page: Fixed typo + new alias section (#1949)
Michael Schmidt 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)
Marcus Kazmierczak 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>` .
RunDevelopment 6b4b2d2b 2019-06-25T03:13:29 Removed unnecessary `lookbehind: true`
Michael Schmidt 5d191b92 2019-06-25T03:08:02 Download page: Fixed Edge's word wrap (#1920) This makes the word break behavior consistent in all browsers.
RunDevelopment e2c56f04 2019-06-24T23:11:51 Resolved conflicts
Michael Schmidt 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.
RunDevelopment 84b9651b 2019-06-24T15:51:46 Rebuilt Prism
RunDevelopment 9c75843a 2019-06-24T15:48:11 Improved inline pattern creation + more comments
RunDevelopment 986c9de0 2019-06-24T15:43:49 More strike tests
RunDevelopment 235fce74 2019-06-24T14:47:41 Improved tests
Michael Schmidt f571cfce 2019-06-14T17:34:53 Perl: Added `return` to keywords.
Paul "LeoNerd" Evans b52a16b4 2019-06-14T16:30:13 Rebuild prism-perl.min.js
Paul "LeoNerd" Evans 4a0ed18d 2019-06-14T16:13:46 Add new keyword to the keyword test file
Paul "LeoNerd" Evans 2f39de97 2019-06-14T15:38:43 Add 'return' to recognised keywords
Michael Schmidt 31fb8bc5 2019-06-12T15:50:04 Added support for Shell sessions This adds support for a Shell session pseudo language.
RunDevelopment 0b48301e 2019-06-12T15:46:07 Resolved conflicts