components


Log

Author Commit Date CI Message
Golmote d9bdd1db 2014-12-16T23:37:10 Fix spacing
Golmote 25c733f8 2014-12-16T21:27:24 Add ActionScript language
Golmote c5044386 2014-12-09T08:21:31 Merge branch 'gh-pages' of https://github.com/LeaVerou/prism Conflicts: components.js
Golmote 05129ed8 2014-12-09T07:54:52 Fix delimiters highlighting + highlight numbers and booleans
Golmote 551f75fc 2014-12-08T23:51:39 Added perl language
Golmote c272a04a 2014-12-08T23:04:02 Added Handlebars language
rbmj 4b606263 2014-09-12T22:05:59 Add NASM (Netwide Assembler) language definition.
Andreas Rohner e2e36855 2014-11-15T19:56:20 Revert invalid move of the language-css alias One of the language-css aliases, which was moved inwards by the previous patch was actually in the right place. This patch reverts the change to correct the newly introduced error of the previous patch.
Andreas Rohner 3154f9b9 2014-11-15T19:09:40 Move invalid alias declarations, which cause HTML highlighting to fail The alias declarations in prism-javascript.js and prism-css.js are in the wrong place and must be moved inside of the pattern object. Otherwise they get injected into the markup grammar. The execution fails, because the alias is a string and not a RegExp.
Lea Verou 17d9aa8a 2014-11-14T20:30:10 insertBefore() with only two arguments appends (similar to how DOM insertBefore() behaves)
Lea Verou 23edcc8c 2014-11-14T20:10:05 Added language-xxx aliases in nested language refs to ease styling
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
Lennard van Gunst ac41a8d2 2014-10-27T15:12:59 Make HTTP response-status case-insensitive
Nate Rosenbloom d5f2653b 2014-10-18T23:04:18 added minified file & removed uncessary objects
Nate Rosenbloom 5a6f744f 2014-10-18T22:58:13 whoops added so the 2 in something like log2 won't parse as a number
Nate Rosenbloom 9b3218d8 2014-10-18T22:15:46 added single quotes and a punctuation tag for parens
Nate Rosenbloom c60d3876 2014-10-18T21:51:06 added scheme language
idleberg 6db22842 2014-10-08T10:07:39 added !makensis command
Lea Verou 6a004cbe 2014-09-22T15:03:10 Merge pull request #360 from zeitgeist87/FixAutolinker Fix for DFS bug with new pattern array feature
Lea Verou f2984edb 2014-09-11T18:40:27 Added SQL variable support
Lea Verou 13d69762 2014-09-11T03:37:35 SQL improvements: Added TEMP keyword
Lea Verou 94a8fd1b 2014-09-10T04:01:25 SQL improvements: added function token (perhaps should be `aggregate` and aliased to function), improved operators a bit, converted regex groups to non capturing
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.
lgiraudel 0a37552d 2014-08-31T22:30:50 Update prism-git.js
lgiraudel e5f83ca8 2014-08-31T22:30:10 Update prism-git.min.js
lgiraudel a33e35fa 2014-08-31T22:04:19 [Git] Fix `deleted` and `inserted` regexp. See LeaVerou/prism#227.
Jannik Zschiesche 14e754fa 2014-08-29T17:07:00 Adjust existing code to a common style Use Tabs.
lgiraudel 8b71e6e4 2014-08-29T15:50:13 [Git language support] oldline => deleted, newline => inserted + typo
Jannik Zschiesche 120c1221 2014-08-29T11:06:22 Added minified apache conf language definition
Jannik Zschiesche c3232e3e 2014-08-29T11:06:10 Renamed apacheconf back to the name without dashes Sorry for the confusion.
Guillaume Truchot 0ea9172c 2014-08-24T15:18:26 Added support for Apache configuration syntax Supports: -All official directives, both block and inline, up to Apache 2.4 -Block directives parameters separated by colon (":") -Comments -Strings -Environment variables (eg. ${HOME})
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
GuiTeK ec2540af 2014-08-23T16:37:01 Fixed 'before-insert' hook Fixed 'before-insert' hook: now checks if language is PHP before assigning env.code to env.backupCode. Only "language-php" defines env.backupCode: without this condition, env.Code would be undefined for any other language than PHP after this hook is called. It would then lead to wrong behaviours (eg. Line Numbers plugin would not show lines).
Aleksandr Zverev ba3bcd23 2014-08-20T14:42:08 Fixed missed encode call for webworkers
Andreas Rohner 312e989c 2014-08-19T12:01:00 Fix line-numbers for PHP in markup The problem is, that inline php code can be anywhere inside of a HTML element. To properly highlight this the php language implementation temporarily replaces all inline php code in `env.code` with something like `{{PHP0}}`. After the markup highlighting is finished it replaces it again with the real code, but it leaves `env.code` corrupted. Since the line-numbers plugin uses `env.code` to count the number of lines, the result will be broken. So to fix this, it must be ensured, that `env.code` is restored before the line-numbers plugin uses it.
Lea Verou e29996a4 2014-08-18T04:03:33 Merge pull request #312 from aviaryan/c-autohotkey updated autohotkey for #307
Lea Verou f88c71ab 2014-08-15T17:34:36 Merge pull request #281 from natecook1000/gh-pages Comprehensive Swift syntax highlighting
Nate Cook 3cd1cb38 2014-08-15T16:30:50 Update Swift syntax for beta 5
Nate Cook 76808147 2014-08-15T11:22:54 fix conflict in prism-swift.min.js
Nate Cook 5acdc618 2014-08-15T11:22:29 Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
Jannik Zschiesche e1a659d3 2014-08-13T16:46:45 Merge pull request #295 from bholst/gh-pages Add language definition for Haskell
Bastian Holst 74578aa0 2014-08-13T09:17:49 Update minified haskell definitions
Bastian Holst 6e26a58b 2014-08-12T21:35:01 Correct haskell support for strings and characters This commit adds correct support for Haskell characters and strings. To me, having only one type of token for characters and strings makes no sense in Haskell as they can be distinguished easily. Characters start with a single quote and strings start with a double quote. Furthermore, characters can only contain —guess what— one character whereas strings can caintain multiple or none of them. String can also have gaps.
Bastian Holst a70fadfd 2014-08-12T20:50:42 Add support for other numbers Add support for * hexadecimal numbers * octal numbers * floating point numbers with exponent
Bastian Holst e1c2148c 2014-08-12T16:28:42 Remove remaining entities
Andreas Rohner e348e602 2014-08-12T12:11:31 Add auto generated files
Andreas Rohner 1724e7a1 2014-08-11T08:26:48 Use the new array syntax for clike and coffeescript This patch uses the new array syntax for the `clike` language and for `coffeescript`. For `clike` it fixes a minor bug, whereby 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. For `coffeescript` the previously used `block-comment` token name is no longer necessary.
Lea Verou 74e3dcbd 2014-08-12T05:30:31 Merge pull request #321 from zeitgeist87/gh-pages Allow multiple regex per token name by using arrays
Andreas Rohner 89bddb84 2014-08-12T11:27:26 Add automatically generated files
Andreas Rohner 43e4e693 2014-08-10T23:26:10 Allow multiple regex per token name by using arrays In most languages there are multiple different ways of declaring the same constructs (e.g. comments, strings, ...) and sometimes it is difficult or unpractical to match all of them with one single regular expression. This patch adds the possibility to use an array of pattern objects. 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 }, { pattern: /(^|[^\\:])\/\/.*?(\r?\n|$)/g, lookbehind: true } ],
Andreas Rohner 4d352495 2014-08-12T01:16:07 Fix Java operators to correctly highlight examples.html This patch basically adds a lot of `=?` at the end of operators that were missing. The order of the `>=` and `<=` operator was wrong. It also changes the order of the lookbehind pattern, so that the start of the line is matched first. This last change fixes a lot of the bugs on the `example.html` page. The design of Prism makes it seem as if the regex multi line flag has no effect, because strings are continuosly split up before the regexes are applied. In this case it is necessary so that `^` is interpreted as the start of a line instead of the start of the document.
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 },
Jannik Zschiesche d4824538 2014-08-08T19:12:12 Added minified latex language definition
Jelmer Borst 24bf8ab7 2014-08-08T13:16:06 Included LaTeX suggestions
Jelmer Borst 657b089f 2014-08-06T19:44:18 Added initial LaTeX support
Avi Aryan e76c4b90 2014-08-01T22:04:58 optimized autohotkey.js even more
Avi Aryan 2ad320bd 2014-08-01T14:10:06 optimized the regex a bit
Avi Aryan 76e66b91 2014-08-01T10:09:21 updated autohotkey for #307, fixes it
Ben Briggs 4247baec 2014-07-28T16:54:50 Fix conflicts.
Brandon Kelly ec93e86c 2014-07-24T12:51:18 Added Twig language
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
Tzu-ping Chung c960493e 2014-07-20T11:25:41 Update Objective-C rules based on #291
Bastian Holst ce35c97b 2014-07-13T22:45:29 Fix documentation Haskell language definitions
Bastian Holst 62fc8621 2014-07-13T22:34:03 Fix handling of '.' in Haskell definition The character '.' may be either a part of an operator, an operator by itself or a separator between module name and variable.
Bastian Holst e7a1c5d3 2014-07-13T21:56:40 Remove escaped entities from Haskell language def
Bastian Holst 8a77383b 2014-07-13T20:49:37 Add language definition for Haskell
Lea Verou 970338c2 2014-07-13T11:31:53 Merge pull request #294 from aviaryan/c-ini ini now also highlights value
Avi Aryan 8beaa6fb 2014-07-13T13:26:00 fixed another bug with ini highlight
Avi Aryan 70677495 2014-07-13T12:51:06 ini now also highlights value
Lea Verou 73855ea2 2014-07-12T12:41:40 Merge pull request #292 from aviaryan/c-autohotkey updated autohotkey minified file
Avi Aryan 513a53af 2014-07-12T13:08:37 updated autohotkey minified file
Andreas Rohner 550c81e7 2014-07-11T21:21:27 Fix for some serious bugs in C and C++ highlighter &lt; and &gt; don't seem to work as they used to. So this patch replaces them with the corresponding < or > sign like it was done in the clike base language. The pattern for macro statements was seriously flawed. It didn't allow for macros with no argument like #else or #endif. This patch fixes the problem and additionally adds support for multiline macros, which are fairly common. #define FOO(a, b, c) \ do { \ do_stuff_here \ do_more_stuff \ } while (0) Furthermore the path of the #include macro is highlighted as a string. #include <stdio.h> #include "config.h" C also allows for multiline strings in a similar way as multiline macros. "This is a \ multiline \ string"
Lea Verou a1047294 2014-07-11T12:40:46 Merge pull request #290 from aviaryan/c-autohotkey updated autohotkey.js
Avi Aryan 41396d8d 2014-07-11T18:23:48 fixed some keywords
Avi Aryan 058f8e9d 2014-07-11T17:59:45 rearranged some keywords
Avi Aryan a8c9775b 2014-07-11T15:55:23 enhanced autohotkey js
Avi Aryan d5dd3be2 2014-07-11T12:00:49 updated ini minified file
Avi Aryan d4f03482 2014-07-11T11:47:07 fixed bugs with ini highlight
Lea Verou af7a42a4 2014-07-10T19:25:02 Updated minified versions
Avi Aryan bb997900 2014-07-10T17:15:14 alphabetically arranged keywords
Avi Aryan d648f371 2014-07-10T13:51:29 added Ini highlighting
Avi Aryan 37c2c180 2014-07-09T15:04:15 added AutoHotkey highlighting
MathieuAlphamosa 069fa6d8 2014-06-30T11:17:22 Update prism-sql.js Faster and more reliable http://jsperf.com/javascript-multiline-regexp-workarounds
MathieuAlphamosa 42ab9b44 2014-06-27T11:11:22 SQL : Multi lines strings 'string' regex modified to accept line breaks as SQL strings can use them.
Tzu-ping Chung e6ff300c 2014-06-26T04:04:42 Use tabs for indentation
Tzu-ping Chung 62687ecc 2014-06-26T03:59:26 objc -> objectivec
Tzu-ping Chung c76f777d 2014-06-25T21:35:03 Add Objective-C syntax
Nate Cook ce28de1e 2014-06-24T22:27:17 Comprehensive Swift syntax highlighting
ChrisChares e2c11520 2014-06-04T17:18:43 added newline to end of prism-swift.js
ChrisChares efc1d2bc 2014-06-04T17:13:37 added swift language
Thomas Ingram 9d5a0969 2014-05-12T11:35:31 Recognize punctuation and reference
Thomas Ingram 5d1cf199 2014-05-10T20:16:58 Recognize character
Thomas Ingram ee4b3838 2014-05-10T19:53:21 Recognize keywords
Thomas Ingram 568728d9 2014-05-10T19:35:07 Recognize regex, symbol, string (crudely)
Thomas Ingram 444c60f9 2014-05-10T19:32:08 Recognize boolean, date, time, datetime, number
Thomas Ingram dc45d573 2014-05-10T13:40:57 Simple start for Rip Recognize comment, builtin, boolean
Jannik Zschiesche d27b693f 2014-06-01T17:18:03 Updated keywords in JavaScript definition * Sort keywords alphabetically (to ease maintenance) * Added all missing keywords * Added ECMAScript 5 keywords * Added true/false/null as explicit keywords Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Reserved_Words Fixes #270