components/prism-core.min.js


Log

Author Commit Date CI Message
Golmote b2f14d96 2015-09-04T08:19:21 Merge branch 'plugin-jsonp' of https://github.com/nauzilus/prism into gh-pages Conflicts: components/prism-core.min.js
Golmote e42a2289 2015-09-03T22:47:50 Explicitly make the Worker close itself after highlighting, so that users have control on this behaviour when directly using Prism inside a Worker. Fix #492
Golmote 0356c58c 2015-09-03T19:09:48 Apply changes from #754 to all plugins so that none of them throw errors in node. Autolinker, Show invisibles and WPD can now be used with node. Removed unused minified CSS file. Also added missing space between attributes during wrapping.
Golmote c8f83b20 2015-09-03T18:43:33 Run gulp task
Golmote ed9f2b21 2015-08-17T08:47:32 Move removal of initial line feed to a plugin
Golmote fd549959 2015-08-13T08:33:48 Fix complete hook behaviour + run gulp task
Golmote 5f133c80 2015-07-16T21:09:40 Fixed prism-core and prism-file-highlight to prevent errors in IE8. Used local variable _self instead of overwriting self. Closes #468.
Golmote 8030db91 2015-06-25T08:00:14 File Highlight: allow to specify the language (takes precedence over extension guess) + Set language on parent even if unknown. Fix #607
Ewald Grusk 1eb49594 2015-02-18T21:52:53 Make use of method `_.util.type`.
Daniel Flint c711660a 2015-01-15T09:00:47 Deep clone arrays
Golmote 703d47e6 2015-01-11T23:18:41 Simplified regexp for trailing line feeds
Golmote 36999ddf 2015-01-08T19:51:55 Handle trailing \r\n and \r
Golmote 2d5089ed 2015-01-08T08:55:24 Remove leading line break Fixes #455
Golmote 86b4d4df 2014-12-20T14:21:28 Run gulp tasks
Lea Verou 17d9aa8a 2014-11-14T20:30:10 insertBefore() with only two arguments appends (similar to how DOM insertBefore() behaves)
Lea Verou 436a7bd6 2014-11-14T19:43:50 Make insertBefore() update pointers to the object from other language definitions. Use case/Example: In dabblet, code-highlight.js adds some extra tokens to CSS. But CSS also extends markup to highlight CSS in style elements/attributes and that happens *before* the extra CSS tokens were added. However, because references were not updated, CSS highlighted in markup was using the original CSS definition, without the added tokens. I’m surprised we haven’t caught this earlier, I’d expect it to affect many advanced uses of Prism.
Lea Verou 4b9e11c6 2014-11-14T19:19:31 CSS highlighting in HTML style attribute
Andreas Rohner 08037e5b 2014-09-05T11:01:02 Fix for DFS bug with new pattern array feature This patch implements support for the new pattern array feature in the Prism.languages.DFS function and fixes a bug in the autolinker plugin. It adds an optional parameter to the callback of Prism.languages.DFS, which contains the type of the current object as oposed to the key in the parent. In most cases both key and type are exactly the same. Only if the parent is an array the key will contain the index number and the type will contain the attribute name of the array in the parent object. The key can be used to replace the object in the parent and the type can be used to provide the necessary context.
Andreas Rohner 3309890f 2014-08-12T13:48:47 Add option to define aliases for tokens This patch adds an option called `alias`, which allows the definition of additional CSS classes for token names. This can be useful, to combine the styling of a well known token, which is already supported by most of the themes, with a semantically correct token name. The option can be set to a string literal or an array of string literals. In the following example the token name `latex-equation` is not supported by any theme, but it will be highlighted the same as a string. 'latex-equation': { pattern: /\$(\\?.)*?\$/g, alias: 'string' }
Andreas Rohner b1cc49d8 2014-08-23T20:02:02 Update minified and auto generated files
Andreas Rohner 89bddb84 2014-08-12T11:27:26 Add automatically generated files
Andreas Rohner fef8cd49 2014-08-10T08:24:02 Allow multiple tokens to be mapped to the same CSS class In most languages there are different ways of declaring the same constructs, but with the current implementation of Prism it is only possible to define one pattern for a particular token type. This is not a problem, as long as it is possible to match everything with one regex. But sometimes it isn't easily possible to do that, especially if things like `lookbehind` or `inside` are needed for one part but not for the other. This patch splits the token type into two parts, whereby the second part is optional: {token type}#{description} For example there is a minor bug in the current definition of the `clike` language, that could be solved with this patch: The character immediately in front of a single line comment is highlighted as a comment as well. something// something This is because both definitions for single and multiline comments have to be matched with a single regex and the `lookbehind` parameter can only be applied to the first captured string. With this patch one could split the two definitions up and use `lookbehind` for both, thereby eliminating the bug. 'comment': { pattern: /(^|[^\\])\/\*[\w\W]*?\*\//g, lookbehind: true }, 'comment#single-line': { pattern: /(^|[^\\:])\/\/.*?(\r?\n|$)/g, lookbehind: true },
Ben Briggs 4247baec 2014-07-28T16:54:50 Fix conflicts.
Jannik Zschiesche 502ed6c1 2014-07-23T10:49:30 Don't set the `self` variable with `var` Firefox directly shadows the global variable `self` if it is present (= in a worker). So we need to set `self` without `var self` but directly.
Jannik Zschiesche eb1cd1c9 2014-07-23T09:49:34 Fix workers The issue is that in workers `window` is undefined. Therefore, in the first line, `self` will be set to `{}`. This will destroy the check for workers later on: ```js if (!self.document) { if (!self.addEventListener) { // in Node.js return self.Prism; } // In worker // ... } ``` because `self.addEventListener` will then be undefined (due to `self = {}`). The fix is to make the check for the environment more clever: 1. check for the browser: `(typeof window !== 'undefined')` 2. check for a worker: `(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)` (from http://stackoverflow.com/questions/7931182/reliably-detect-if-the-script-is-executing-in-a-web-worker) 3. assume we are in node
Ben Briggs 7cfd29a9 2014-05-26T11:20:55 Rebuild minified files.
Lea Verou 4a472307 2014-05-24T16:14:20 Minified files
Lea Verou 603a8a02 2014-05-24T15:26:54 Added twitter link to footer, minified some files
Lea Verou eb65c68b 2014-05-24T14:13:36 Generated minified versions & prism.js after merging #258
Lea Verou 62561684 2014-05-22T17:36:51 Reversed change in Core
Lea Verou 0bf2a8e5 2014-05-22T17:28:57 Updated minified files
Lea Verou 8344fd5c 2014-04-21T13:37:18 Updated minified files
Lea Verou 1d899d7d 2013-06-14T11:46:34 Fixed parsing for entities and <> chars
Siavash Askari Nasr 29b28801 2013-05-21T16:01:30 Added 'before-insert' hook. After when code is highlighted and before being inserted to document.
Miles Johnson c82d6df0 2013-05-18T17:31:20 Added min files
Lea Verou 801aab58 2013-05-11T04:37:44 Added parent access to wrap hook
Lea Verou c3a69913 2013-05-09T21:01:17 Added language id to wrap hook
Lea Verou 358fbbd6 2013-01-27T03:50:38 Replaced iteration with Array#map
Lea Verou 1b40db97 2012-11-10T00:23:33 Made Java & JavaScript inherit from a generic C-style language definition; Added methods for language definition inheritance; Added simple dependency management in downloader
Lea Verou 54fdc1f4 2012-09-13T20:06:11 Removed pointless trim()
Lea Verou ddd1eb89 2012-08-01T12:02:46 Applied #15 to prism-core.js
Lea Verou c75bbc24 2012-07-31T19:08:31 Fixed bug with classnames
Lea Verou ec8fb796 2012-07-31T17:47:56 Added helper method Prism.languages.DFS
Lea Verou 54e2eeab 2012-07-29T00:26:50 Added (and documented) Prism.languages.insertBefore
Lea Verou 4da6cfcd 2012-07-27T00:08:10 Removed useless code
Lea Verou 6763cd53 2012-07-26T18:48:34 Fixed bug where block code wasn’t styled properly
Lea Verou 9ea52e2a 2012-07-26T18:41:49 Removed IE8 support
Lea Verou cfaf681d 2012-07-26T18:17:55 Removed the need for .prism
Lea Verou 1b5ab23a 2012-07-23T19:32:27 Added setting to turn automatic highlighting off and to set a default language
Lea Verou bd4e8d15 2012-07-23T18:54:30 ALL THE THINGS! Most notably: Simple templating, API changes, show invisibles plugin, download (build) page
Lea Verou a4b9b918 2012-07-18T15:57:08 Added minified versions