plugins


Log

Author Commit Date CI Message
Matt Chaffe 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.
libantema 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.
Michael Schmidt 59d4323f 2019-04-25T19:54:58 Copy to clipboard: Fixed typo (#1869) This fixes a small type in the webpage of the copy to clipboard plugin.
Michael Schmidt eb28b62b 2019-04-19T22:10:04 Autolinker: Improved URL regex (#1842) This changes the regex for matching URLs to include the `@` character and improves the pattern to avoid backtracking.
Daniel Ferguson 0f16eb87 2019-03-26T03:24:51 Line numbers: Fixed typo on webpage (#1838) This corrects a small typo on line number's webpage.
Michael Schmidt 66b44e3b 2019-03-24T23:03:10 Travis: Fail when changed files are detected (#1819) This adds a new check to the Travis CI config which will cause the build to fail if any files change (This usually indicates that the committer forgot to rebuild Prism.). To implement this, we also add the `package-lock.json` file.
Michael Schmidt 3ad47047 2019-03-24T21:17:06 Toolbar: Minor improvements (#1818) The `registerButton` function will now log a warning and do nothing if a button is registered twice.
Michael Schmidt 5c1a6fb2 2019-03-24T19:05:03 Added alias tests (#1832) This adds tests which check the aliases specified in `components.json`.
Michael Schmidt 52889b5b 2019-03-24T18:52:44 Autoloader: Added support for aliases (#1829) This adds alias support for the Autoloader plugin.
Michael Schmidt 8d28c74c 2019-03-24T18:44:24 Added missing aliases (#1830) This adds some missing aliases.
Michael Schmidt fd4c764f 2019-03-24T18:43:31 Autoloader: Fixed the directory of scripts (#1828) This fixes some incorrect script paths.
Michael Schmidt 64baec3c 2019-03-24T18:39:32 Added `hs` alias for Haskell (#1831) This adds `hs` as an alias for Haskell.
Michal 30779976 2019-03-20T22:10:17 Added support for CMake language (#1820) This adds support for the [CMake](https://cmake.org/) language.
Michael Schmidt 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.
Guillaume Grossetie a944c418 2019-03-11T17:55:56 Add unit tests to the Keep Markup plugin (#1646) Uses JSDOM to simulate the DOM in node.
Michael Schmidt 439ea1ee 2019-03-11T00:32:45 Added scripts directory (#1781) This adds a new `scripts` directory for all scripts used exclusively by the prismjs.com website.
Michael Schmidt 14be7489 2019-03-10T18:56:59 Line numbers: Added inheritance for the `line-numbers` class (#1799) This adds inheritance for the `line-numbers` class for the Line numbers plugin similar to the inheritance of `language-xxxx` classes.
Michael Schmidt f2467488 2019-03-10T18:53:08 Django/Jinja2 improvements (#1800) This completely rewrites the Django language definition. It's now based on markup-templating.
Michael Schmidt 3e00bb9c 2019-03-07T15:22:30 Rebuilt Prism (#1794) This is a rebuilt of Prism to update minified files.
Michael Schmidt 5dd8f916 2019-03-06T18:09:45 JSONP highlight: Fixed minified adapter names (#1793) This fixes that the Uglify minified functions names made the pre-defined adapters un-removable.
Michael Schmidt c9762c6f 2019-03-06T13:47:25 Better class name detection for plugins (#1772) This improves the class name regex of a few plugins to avoid false positives.
Michael Schmidt c37c90df 2019-03-05T22:17:36 Added EJS (#1769) This adds the EJS (Embedded JavaScript templates) language to Prism.
Michael Schmidt c9a32674 2019-03-05T22:06:33 Fixed dependencies of Pug and Pure (#1759) This removes dependencies of Pug and Pure to languages which do not exist (yet).
Michael Schmidt 16f2ad06 2019-03-04T22:59:24 Added T4 Text Templates (#1699) This adds T4 Text Templates in both the C# and VB language variants.
Michael Schmidt 493d19ef 2019-02-28T21:01:31 Added doc comment highlighting (#1541) This adds support for JavaDoc, JSDoc, TSDoc, and PHPDoc.
Michael Schmidt bb628606 2019-02-28T20:19:45 Added JS Extras (#1743) This adds JS Extras, a few additional features for the JS language.
Michael Schmidt 64dc049d 2019-02-28T19:28:22 Added JSON5 language (#1744) This adds the JSON5 language to Prism.
Michael Schmidt 13e1c97d 2019-02-28T19:23:25 Added EBNF language (#1756) This adds the EBNF language.
Michael Schmidt 1df96c55 2019-02-28T19:18:05 Added BNF and RBNF languages (#1754) This adds the BNF and RBNF languages.
Michael Schmidt 6d98f0e7 2019-02-28T19:10:37 Added ANBF language (#1753) This adds a new language: ANBF (Augmented Backus–Naur form).
Michael Schmidt b5041cf9 2019-02-26T05:41:01 Fix JSONP support (#1745) This PR fixes that JSON did not support [JSONP](https://en.wikipedia.org/wiki/JSONP) callback functions. I also added a JSON example page.
Michael Schmidt ce9616a0 2019-02-20T16:12:00 Fix typo (#1755)
Rex Zeng 5311ca32 2019-02-12T20:49:39 Fixed Toolbar plugin example (#1726) There was a function parameter missing in one of the Toolbar plugin examples.
Michael Schmidt 8cf20d49 2019-02-11T20:35:25 Fix Autolinker url-decoding all tokens (#1723) This PR fixes #1721. The problem was that the url-decoding introduced in #1173 was applied to all tokens.
Bruce Hyslop 00f4f04f 2019-02-07T23:20:34 Line Numbers plugin instructions clarifications (#1719) This fixes typos and makes clarifies some instructions of the Line Numbers plugin.
Michael Schmidt 1090b253 2019-01-23T04:45:07 Show invisibles inside tokens (#1610) This PR fixes #1608. The patterns for invisible characters (ICs) are now also recursively added to the `inside` of every pattern. I also had to change the color of ICs because in #1607 I changed the color to `inherit` which causes the ICs to have different colors depending on which token they are inside of. So, to make everything consistent, I changed the color to grey (`rgb(128, 128, 128)`) and made it half transparent so it would blend in. Looks really similar to #1607. --- Most of the code is just traversing the language definition, handling the different kinds of tokens (simple regex, array, pattern object), and trying not to fall because of the added tokens for ICs and the `rest` property.
Michael Schmidt 4c66d72c 2019-01-22T11:55:33 Show Language plugin alias support and improvements (#1683) Adds support for aliases and optimizes the name guessing.
Michael Schmidt cd058a91 2019-01-22T01:19:27 Fix typos & other issues in JSONP docs (#1672) This PR fixes some typos, indentation mistakes, and corrects the language of some `code` elements.
Michael Schmidt 28489698 2019-01-22T01:17:50 Cleanup JSONP highlight code (#1674) Document, refactor and format the JSONP Highlighting plugin.
Stephan Max b94b56c1 2019-01-15T15:54:35 Added the Nand2Tetris HDL language (#1710) This adds support for the [Nand2Tetris](https://www.nand2tetris.org/) HDL language.
Toby Wilds 7def8f5c 2019-01-03T23:52:27 Added N1QL language support (#1620) Adds support for[N1QL](https://www.couchbase.com/products/n1ql) for Couchbase.
JeongHoon Byun (aka Outsider) c939df8e 2018-12-27T20:56:24 Added support for HCL (#1594) Adds support for HCL ([HashiCorp configuration language](https://github.com/hashicorp/hcl)).
Volk b48c012c 2018-12-15T20:32:22 Added Vala language (#1658) Adds support for the Vala language.
Michael Schmidt 4a8219a4 2018-12-02T19:25:05 Add support for Java stack traces (#1520) There are 3 main types of elements which are highlighted: 1. The summary. This is the head of the stack trace and includes the name of the exception and a message. `Exception in thread "main" java.lang.RuntimeException: A test exception` 2. Stack frames. These make up the actual stack trace and include the full name of the method and the source. `at com.stackify.stacktrace.StackTraceExample.methodB(StackTraceExample.java:13)` 3. Omitted frames. This is a simple message that some frames were omitted. `... 27 more` Everything besides these 3 element types will not be highlighted.
Michael Schmidt 5b6ad70d 2018-12-02T16:44:21 Add TOML support (#1488) Add support for [Tom's Obvious, Minimal Language](https://github.com/toml-lang/toml). Some simplifications: 1. The `.`s of dotted keys are not highlighted. This is because the `.` could be inside quotes and checking that isn't easy. 2. There is no distinction between table `[foo]` and array `[[foo]]`. `foo` will be highlighted as `table` in both cases.
Michael Schmidt b0d1823c 2018-12-01T21:24:31 Clean up Previewers' page (#1630) This PR makes some changes to the [Previewers plugin's page](https://prismjs.com/plugins/previewers/). 1. Format the code examples to look nicer. 2. Fix the example of the 'Disabling a previewer' section. 3. Highlight API snippets as JavaScript.
Michael Schmidt 2288c25e 2018-12-01T18:37:20 Add G-code language (#1572) This PR adds the [G-code language](https://reprap.org/wiki/G-code) to Prism and resolves #1571. ### Features - All fields from A-Z ([case sensitive](https://reprap.org/wiki/G-code#Case_sensitivity)) and [checksums](https://reprap.org/wiki/G-code#.2A:_Checksum) (`*`). - [Comments](https://reprap.org/wiki/G-code#Comments) of both the semicolon and parenthesis style. - [Quoted strings](https://reprap.org/wiki/G-code#Quoted_strings). - The colon punctuation of [lists (see the example)](https://reprap.org/wiki/G-code#M584:_Set_drive_mapping).
Starbeamrainbowlabs 38def334 2018-11-28T17:45:17 Add new language: CIL (#1593) Add support for the Common Intermediate Language from .NET.
Олег Дутченко 10239c14 2018-11-28T15:29:22 Prevent double-loading & add scope to File Highlight (#1586) Checks if a file has been loaded already and bails if it is and adds the ability to limit the scope of the file highlight plugin.
Michael Schmidt 9f6e5026 2018-11-28T14:23:53 Fixed class regex for Command Line plugin (#1566) Fixes #1564 where the plugin would wrongly detect `command-line-prompt` causing the alignment issue.
RunDevelopment 7a2d153b 2018-11-12T20:14:19 Revert "Show invisibles inside tokens" This reverts commit 2d622f17e4f6d746e8f4fa211c7f6b7ccb3f27b4.
RunDevelopment 2d622f17 2018-11-12T20:12:44 Show invisibles inside tokens
Michael Schmidt 2ba62268 2018-11-12T13:32:32 Updated styles of show invisibles (#1607) Changes the color of the placeholders of invisible characters. They will now use the default text color of the theme as the base and blend in instead of a fixed color for all themes.
Michael Schmidt bfa5a8d9 2018-09-23T15:17:22 Resolved variable name clash (#1568) There is another variable named script in the autoloader.
Mark Shi e529edd8 2018-09-15T21:52:37 Add GameMaker Language support (#1551) GameMaker is a cross-platform game engine developed by YoYo Games.
Michael Schmidt 2fb66e04 2018-08-19T16:50:41 Added missing aliases to components.json (#1503) Also enforced `alias` before `owner`.
Michael Schmidt 4b56f3c1 2018-08-19T16:33:54 Fixed Previewers bug #1496 (#1497) The problem was a bug unique to Firefox which causes offsetTop of span.token to always be 0 under certain conditions. It only occurred together with of the line-number plugin because setting position: relative for the pre > code elements triggers that FF bug. The offset is now calculated using bounding boxes. Tested in Chrome, Edge, IE, FF, and Opera. Fixes #1496.
Michael Schmidt 44fed4d3 2018-08-19T16:10:29 Replaced all occurrences of `new RegExp` with `RegExp` (#1493) Using the factory vs constructor form is the same, so removing `new` results in less code.
James DiGioia 09b56af2 2018-06-16T11:34:41 Merge pull request #1430 from PrismJS/add-tap Add TAP component
mAAdhaTTah 9ee4f547 2018-06-01T13:52:21 Make line-numbers styles more specific The padding added to `pre.line-numbers` in the line-number's CSS is overwritten by the theme's CSS if the theme is loaded second. This ensures the CSS can come in any order without specificity issues.
isaacs 8c2b71f1 2017-01-27T20:21:46 Add TAP component Includes build changes.
Golmote a0bfc84d 2018-05-26T11:59:14 Add `objectpascal` as an alias to `pascal` (see #1426)
Golmote e326cb03 2018-05-26T11:39:35 Add support for XQuery. Fix #1405 (#1411)
Guido Flohr e063992b 2018-05-10T12:07:34 Support for Template Toolkit 2 (#1418) * support for Template Toolkit 2 * optimized quoted string regexes * optimized double-quoted string regex * fully qualified tt2 plug-in names don't work Also use \w. * do not use empty character class See #1107. * put keyword tests in alphabetical order * ordered tt2 keywords alphabetically * removed redundant operator rule for tt2 * removed possibly existing old rules before inserti * indentation * allow backslash in front of lf in tt2 strings * indentation * avoid backtracking * escape xml special characters * indent with tab instead of spaces * greedy is no longer needed for variables Also use \w instead of explicit character class. * re-generated with gulp
Golmote fa328bb1 2018-05-01T16:53:32 ASP.NET should require C#
Golmote 0a701430 2018-05-01T16:53:13 Run gulp
Jake Worth eef860cb 2018-04-27T17:23:38 Move guard into conditional and check for language
Jake Worth c1118692 2018-04-27T16:50:27 Don't process language if block language not set Adding this guard to the function prevents an error if the language is undefined. `env.language.substring(0, 1).toUpperCase()` can fail with `Uncaught TypeError: Cannot read property 'substring' of undefined` when `env.language` is undefined.
Valtteri Laitinen 7bc9a4a1 2018-04-22T16:18:32 Simplify lang regex on File Highlight plugin (#1399) Similar to #854.
Valtteri Laitinen d95f8fb4 2018-04-22T15:55:38 Use rel="icon" instead of rel="shortcut icon" (#1398)
Golmote cd22499c 2018-04-17T21:31:45 File Highlight: Fix issue causing the Download button to show up on every code blocks.
Valtteri Laitinen 95146c8f 2018-04-17T01:28:42 Use HTTPS / canonical URLs (#1390) Also, remove the broken link in `/index.html`.
Golmote b4509bf5 2018-04-11T08:58:28 Add support for Soy (Closure Template). Fix #1316 (#1387)
Golmote c28d8c5e 2018-04-11T08:53:56 Add support for WebAssembly. Fix #1140 and fix #1384 (#1386)
Golmote 6e0b20a4 2018-04-11T08:50:52 Add support for GEDCOM. Fix #899 (#1385)
Golmote c673ec29 2018-04-11T08:47:26 Add support for Visual Basic. Fix #985 (#1382)
Golmote 5a524f7e 2018-04-11T08:44:44 Add support for Velocity. Fix #1372 (#1378)
Golmote 659ea314 2018-04-07T10:41:08 Core: Fix support for language alias containing dash `-`
Golmote 9f22952d 2018-03-26T22:25:03 File Highlight: Add option to provide a download button, when used with the Toolbar plugin. Fix #1030
Chris Wells 094d5463 2018-03-26T02:14:54 Command Line: Allow specifying output prefix using data-filter-output attribute. (#856)
Golmote 5f9c078a 2018-03-25T13:46:42 Make ERB, Handlebars, PHP and Smarty highlight properly in NodeJS (#1367)
Golmote 3599e6a3 2018-03-11T12:11:51 Add support for PL/SQL (#1338) * Add support for PL/SQL (Fix #1149) * Merge gh-pages
Golmote e6213acb 2018-03-11T12:02:50 Add support for ERB. Fix #1318
Golmote c3ed5b52 2018-03-11T11:11:05 Website: Auto-generate example header with component title, list of aliases and dependencies. `overrideExampleHeader` can be used to generate only the component title.
Golmote 0bc98ac1 2018-03-07T21:31:40 Add support for ARFF (Fix #653) (#1327)
Golmote 109bd6f8 2018-03-04T13:42:41 Autolinker Plugin: Allow more chars in query string and hash to match more URLs. Fix #1142
Golmote c246c1a6 2018-03-04T12:32:19 Unescaped Markup Plugin: Use msMatchesSelector for IE11 and below. Fix #1302
James DiGioia fce583b2 2018-03-01T13:05:13 Merge pull request #1314 from mAAdhaTTah/feature/bump-clipboard-version Bump ClipboardJS to 2.0.0 and remove hack
Pavel Kutáč 929cc8c0 2018-03-01T16:50:57 Add also minified version
Pavel Kutáč ebe24b2e 2018-03-01T16:39:00 Fix rehighlighting
mAAdhaTTah e9f410ea 2018-03-01T10:15:27 Bump ClipboardJS to 2.0.0 and remove hack This is no longer needed, since it no longer conflicts w/ the built-in global.
Golmote 3dddac91 2018-03-01T08:51:45 Autoloader: Fix demo page
Pavel Kutáč 84eeb895 2018-02-23T00:12:17 Prevent scrolling toolbar with content If content is wider than screen, during scrolling toolbar is not moving anymore.
Golmote 7a9dbe05 2018-02-12T23:43:12 WebPlatform Docs plugin: Fix links. Fixes #1290
Golmote e84ab106 2018-02-05T08:39:29 Run gulp
Mattias fbe82b86 2018-02-05T08:36:19 added tsx support (#1280) * added tsx support * fixed order in components.js and added tsx example file * escape less than and capitalize tsx
Andreas Lind b08cae56 2018-01-31T22:38:01 Add support for highlighting CSP, HSTS, and HPKP (#1275) * Add CSP support. * Add HPKP support. * Add HSTS support. * Updates based on feedback. * Updates based on feedback. * Updates based on feedback. * Updates based on feedback. * Updates based on feedback. * Updates based on feedback. * Updates based on Feedback. * Fix parentheses. * List csp, hpkp, and hsts in components.js * Add missing base64 chars to 'nonce-...' and 'sha-...' source expressions * Add support for 'sha384-...' and 'sha512-...' source expressions * Add tests and examples for csp * Add tests and examples for hsts * Add tests and examples for hpkp * hpkp: Include the sha256 hash in the directive itself Prevent the numbers in the base64 string from being classified as "safe" or "unsafe". * Rebuild the minified csp and hpkp components * Rebuild the "Show Language" plugin as well * Fix copy/paste error in test description
Golmote 7bcdae72 2018-01-17T23:32:41 Unescaped markup plugin: Make it work with any language (#1265)
Golmote 28e4b4c6 2018-01-16T08:48:08 Previewers: New plugin combining previous plugins Previewer: Base, Previewer: Angle, Previewer: Color, Previewer: Easing, Previewer: Gradient and Previewer: Time. Fix #913 (#1244)
Golmote 39502622 2017-12-19T07:50:47 Run gulp