plugins/autoloader


Log

Author Commit Date CI Message
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 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`.
RunDevelopment 0b48301e 2019-06-12T15:46:07 Resolved conflicts
Michael Schmidt 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.
Michael Schmidt a8164559 2019-06-02T14:36:05 C#: Added `cs` alias (#1899)
Michael Schmidt 5ad58a75 2019-05-28T18:25:04 LaTeX: Added TeX and ConTeXt alias (#1915) Added TeX and ConTeXt alias. Some minor formatting.
RunDevelopment 96044979 2019-05-15T21:06:59 Added shell session language
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 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 fd4c764f 2019-03-24T18:43:31 Autoloader: Fixed the directory of scripts (#1828) This fixes some incorrect script paths.
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 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 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 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.
Volk b48c012c 2018-12-15T20:32:22 Added Vala language (#1658) Adds support for the Vala language.
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.
isaacs 8c2b71f1 2017-01-27T20:21:46 Add TAP component Includes build changes.
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#
Valtteri Laitinen d95f8fb4 2018-04-22T15:55:38 Use rel="icon" instead of rel="shortcut icon" (#1398)
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 5a524f7e 2018-04-11T08:44:44 Add support for Velocity. Fix #1372 (#1378)
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 3dddac91 2018-03-01T08:51:45 Autoloader: Fix demo page
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
Golmote 39360d6d 2017-12-07T19:58:28 Merge branch 'autoloader-path1' of https://github.com/bazooka07/prism into bazooka07-autoloader-path1 # Conflicts: # plugins/autoloader/prism-autoloader.min.js
bazooka07 e66de38b 2017-12-06T23:03:15 fix for autoloader plugin
Golmote 05cc391a 2017-12-06T20:35:51 Run gulp and reorder components alphabetically
Tuna Celik 0fffa9df 2017-12-06T20:27:49 Xeora Language implementation (#1239)
bazooka07 d74430ff 2017-11-25T16:31:01 upgrade autoloader
Golmote d27b70dc 2017-11-11T23:42:44 Add support for Flow Fix #1216
Erin Wild 2169c995 2017-10-21T04:06:35 Add Python builtin function highlighting (#1205) * Add Python builtin function highlighting * Add builtin functions from Python 3.6 * Python: Add 'nonlocal' and 'None' keywords * Update tests for Python * Python: Remove duplicated builtins that are already keywords * Run gulp
Erin Wild 317f6908 2017-10-20T12:29:15 Update function test for Python and run gulp
Golmote ea2d63e7 2017-10-10T08:51:04 Run gulp
Golmote 311aeda0 2017-10-10T07:42:26 Run gulp
Jake Miller 35ec61a3 2017-10-10T15:10:04 Minor spelling changes for style
Jake Miller f680ee70 2017-10-10T15:05:49 Updated all instances of jade to be named pug.
Golmote 5ac0afb4 2017-09-16T12:58:50 Merge branch 'opencl' of https://github.com/Milania1/prism into Milania1-opencl # Conflicts: # plugins/autoloader/prism-autoloader.js # plugins/autoloader/prism-autoloader.min.js # plugins/show-language/prism-show-language.js # plugins/show-language/prism-show-language.min.js
Jan S. (Milania1) 1a628b8d 2017-08-17T22:12:51 Add OpenCL language support
bsmith 98867cf0 2017-05-29T15:28:00 initial commit
Golmote 88300817 2017-05-08T13:26:16 VB.Net: Add example + tests + fix regexps
Golmote d6e068aa 2017-01-28T10:36:10 Run gulp
Golmote 3cae6ce8 2016-11-19T12:16:31 Add support for Reason. Fix #1046
thesave dfc19413 2016-11-09T01:57:46 Add support for the Jolie language (#1014) * Added component for the Jolie language * Added Jolie among the supported components * update for merge - revised jolie component - added tests - added code example - minified with `gulp` * fixes * fixes * fixed Jolie html file example and highlight for punctuation * fixed indentation in test html file and added comma as punctuation
Masataka Kuwabara 22cb0187 2016-09-14T05:44:22 Fix typo `Fload` to `Float` in prism-ruby.js (#1023)
Golmote f89b0b96 2016-09-02T00:45:09 Autoloader plugin: don't try to load "none" component. Fix #1000
Golmote 2b0cc8ab 2016-07-04T21:06:44 Xojo does not need to require Basic
Golmote 5e62f023 2016-07-04T20:13:26 Add support for Xojo. Fix #898
Golmote 5c815d35 2016-07-04T08:59:15 Add progress indicator on "Download all grammars" link on Autoloader plugin page
Golmote 96719967 2016-07-03T23:43:37 Remove duplicated script on autoloader plugin page
Golmote 4a3cdfee 2016-06-18T15:45:25 Add a way to download all grammars as a Zip directly from the Autoloader plugin page
Golmote b4f34239 2016-06-18T15:01:08 Add a couple more details on how to use the Autoloader plugin
Andreas Rohner 9cbf9d77 2016-04-30T12:04:06 Update auto-generated values in the autoloader plugin The auotloader plugin contains a variable that is auto-generated by gulp. This variable was updated by the addition of the new language protobuf.
Golmote eb7aa969 2015-10-22T07:12:42 Add support for Kotlin
Golmote c02b11f6 2015-10-21T06:35:40 Run gulp
Golmote e25da0da 2015-10-15T08:55:07 Add support for Haxe
Golmote 2ba763e0 2015-10-13T21:08:49 Add support for Parser
Golmote 6d94e037 2015-10-04T21:29:28 Run gulp
Golmote 89c5f34c 2015-09-27T11:04:37 Run gulp task
Golmote e62c88ed 2015-09-23T08:41:41 Add nginx to components, fixed basic highlighting, add a few tests
Golmote eadc18c1 2015-09-22T23:26:28 Run gulp task
Golmote 0064ec86 2015-09-11T07:40:00 Autoloader Plugin: small fixes + code style
Golmote 42094eee 2015-09-10T09:09:03 Autoloader Plugin