tests


Log

Author Commit Date CI Message
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 d9fa29a8 2019-02-15T16:03:59 Make `undefined` a keyword in JS (#1740)
ExE Boss fccfb98d 2019-02-14T01:25:25 Added `pnpm` function to Bash (#1734) This adds `pnpm` to the list of supported functions in Bash.
Frankie Wittevrongel 3a32cb75 2019-02-13T22:33:38 Added `yarn add` to bash functions (#1731) Adds `yarn add` to bash functions.
Michael Schmidt baf6bb0c 2019-02-13T20:31:50 Add support for # comments to INI language (#1730) This PR resolved #1729. Disclaimer: # comments are only supported by [some implementation](https://en.wikipedia.org/wiki/INI_file).
Rex Zeng 4362e42c 2019-02-12T23:30:14 Support JSX/TSX class-name with dot (#1725) Adds class-name highlighting for JSX/TSX tag names containing dots.
Rex Zeng 57a92035 2019-02-12T20:43:31 Improved JavaScript parameter recognization (#1722) - The first letter of a parameter can now be upper case. - Fixes too greedy regex by introducing recursive expressions.
Michael Schmidt 7eccea5c 2019-01-22T00:49:40 Improve C language (#1697) This PR adds support for [hexadecimal floating-point literals](http://www.cplusplus.com/doc/tutorial/structures/), and [`enum`](https://www.geeksforgeeks.org/enumeration-enum-c/) and [`struct`](https://www.tutorialspoint.com/cprogramming/c_structures.htm) class names.
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.
volado 439e3bd7 2019-01-11T00:54:01 Made false, true, and null constants in PHP (#1694) - This adds the `constant` alias to `false` and `true`. - `null` is no longer `keyword` but a `constant`.
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.
volado 55fb0f8e 2019-01-03T17:22:02 Update PHP keywords (#1690) This removes PHP 4 specific keywords and adds new PHP keywords. Keywords previously classified as functions are now classified as keywords.
volado f1026b4b 2019-01-03T01:41:36 Improve recognition of constants in PHP (#1688) The pattern for PHP constants now have to be a valid identifier and recognizes single-letter names.
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)).
Valtteri Laitinen 4f6f3c7d 2018-12-24T17:28:06 Allow multiline CSS at-rules (#1676) Allows for CSS at-rules containing line breaks.
Volk b48c012c 2018-12-15T20:32:22 Added Vala language (#1658) Adds support for the Vala language.
anton-balaniuc 6e250a5f 2018-12-06T07:27:46 Added module keywords to Java. (#1655) This adds the in Java 9 introduced module keywords to Java. Namespaces following these keywords are also properly highlighted.
Gal Schlezinger 8b1bb469 2018-12-03T15:34:30 Added additional operators to Reason (#1648) This adds the `|>` and `->` operators to Reason.
Michael Schmidt 9de47d3a 2018-12-03T14:20:07 Fixed CSS extra variable (#1649) Details are described [here](https://github.com/PrismJS/prism/pull/1450#discussion_r238257002). I decided to go with the property variant, highlighting custom property declarations as `variable`.
Rex Zeng 5fcee966 2018-12-03T20:55:22 Identify CSS units and variables (#1450) Assume CSS unit is a word or `%` after a number, CSS variable is a word inside `var()`. `%` is not recognized as a part of number, but the leading `-` is. When using minus operator in `calc` function, we must type a space in both sides of `-` (value like `calc(100%-5px)` is wrong), so if we met a pattern like `-[\d.]` in a CSS value (not in selector, rule or variable), it must be the start of a negative number.
Rex Zeng 0cc8c56a 2018-12-03T20:52:13 Identify JavaScript function parameters (#1446) Support parameters for these types of functions: ```javascript // es6 class method foo(x, y) {} // es6 arrow function (x, y) => x x => x // es5 function function foo(x, y) {} // es5 anonymous function function (x, y) {} ```
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 a69c2b62 2018-12-02T16:48:53 Improvements to Python F-strings and string prefixes (#1642) This PR adds support for [string interpolation](https://www.python.org/dev/peps/pep-0498/) (aka. f-strings) and makes the [string prefixes](https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals) part of the string. Resolves #1636. ### Known issues Assumes that strings inside the interpolation expression are 'nice'. So strings with unfortunate numbers of curley braces will cause incorrect highlighting: E.g.: `f"{'}'}"`.
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 2577b6e6 2018-12-02T00:07:24 Add decorator support to Python (#1639) Add support for Python decorators, implementing #1635 using the solution proposed by @spectras. Also add 2 aliases: `annotation` to be like Java and `punctuation` to change the actual color (like Java). This resolves #1635.
Cameron Bothner 72775919 2018-12-01T16:38:05 Consistent Ruby method highlighting (#1523) Ruby methods might or might be called in C-style creating inconsistent highlighting. This highlights only method definitions and removes the highlighting of C-style-invoked methods.
Michael Schmidt 2a4758ab 2018-12-01T21:44:57 Improve regex detection in JS (#1473) The pattern for regular expressions in JS now also matches empty character sets and it handles expressions like `/[\]/]/` now correctly.
Michael Schmidt 81bd8f0b 2018-12-01T21:44:17 Improve Java (#1474) A bunch of small improvements for the Java language. 1. Class highlighting based on [naming conventions](http://www.oracle.com/technetwork/java/javase/overview/codeconventions-135099.html). Because of these conventions, we know that every name which starts with an uppercase letter and contains some lower case letters afterward is a class, interface or enum. 2. Nested generics are now supported. The contents of a generic statement are no longer highlighted as a `function`, but as a `class-name` which is more fitting. 3. Packages will now be highlighted as `namespace`. 4. E.g. `foo::bar`, `bar` will be highlighted as a function. 5. ~Support for `var`.~ #1549 6. `null` is now a keyword. As it should be.
Michael Schmidt 3b1e0916 2018-12-01T21:34:04 Improvements to C# operator and punctuation (#1532) Solve the issue of [C# breaking ligature fonts with the `=>` operator](https://github.com/PrismJS/prism/issues/1133#issuecomment-413553956). `=>` is now an operator. There are also some other changes. 1. `?` and `:` are now all included by `punctuation`. Because `:` cannot be included in `operator` (because it is also used for inheritance) the `?` shouldn't be an `operator` either. 2. `??` and `?.` were added to `punctuation`. They weren't explicitly supported before. 3. An operator-test was added.
Michael Schmidt 00bfc969 2018-12-01T21:27:42 Improve F# (#1573) Implement a few F# features: 1. [Attributes](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/attributes). 2. [Computation expressions](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/computation-expressions) (resolves #1459). 3. Class names for type annotations, [casts ](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/casting-and-conversions)(not including `as`), definitions and instancing (resolves #1460). 4. Proper support for ([nullable](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/symbol-and-operator-reference/nullable-operators)) [operators](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/symbol-and-operator-reference/).
Michael Schmidt b0717e70 2018-12-01T21:09:13 Add support for code blocks in Markdown (#1562) It also supports syntax highlighting! The highlighting is done in two steps: 1. Add an alias `language-****` containing the given language to the `code-block` token. This happens in the `after-tokenize` hook. 2. Highlight the code with the `wrap` hook. This is to get around the encoding (`util.encode`) of tokens in `Prism.highlight`. By using this procedure we get the correct execution of the `before-tokenize`, `after-tokenize`, and `wrap` hook for all included languages.
Michael Schmidt c988936b 2018-12-01T19:46:13 Resolved merge conflict
Michael Schmidt 1b75da90 2018-12-01T18:46:55 Improved HTTP content highlighting (#1598) Extends the content highlighting capabilities of HTTP. 1. Add support for `application/javascript` and `text/css` content types. 2. Change the languages associated with certain types: 1. `application/json` now uses `json` with `javascript` as a backup instead of just `javascript`. 2. All XML types now use `Prism.languages.xml` instead of `markup`. 3. The HTML type now uses `html` instead of `markup`. 3. Add support for highlighting based on [suffixes](https://en.wikipedia.org/wiki/Media_type#Suffix) for XML and JSON. E.g. `image/svg+xml`, `application/xhtml+xml`, `application/atom+xml` will use `xml` and `application/calendar+json` will use `json`. 4. Stylistic changes: 1. Fix indentation. 2. Use single quotes for token names.
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).
Michael Schmidt 225dd3f7 2018-11-29T14:07:27 Scheme improvements (#1556) 1. `)` is part for symbols (strings). 2. Function names which have a keyword/builtin as a prefix are not matched correctly. 3. Zero-length function names. 4. `'` is highlighted as `string` even if it marks a list. Also add support for Scheme characters.
Michael Schmidt 1d1fb800 2018-11-29T13:43:22 Python: Operator keywords are now keywords (#1617) Change `and`, `not`, and `or` to keywords.
Ralf Biedert 3590edde 2018-11-29T12:25:28 Add missing keywords to rust. (#1634) Adds `dyn`, `Self`, and `union` to the list of rust keywords.
Starbeamrainbowlabs 38def334 2018-11-28T17:45:17 Add new language: CIL (#1593) Add support for the Common Intermediate Language from .NET.
Michael Schmidt c6584290 2018-11-28T16:12:09 Fixed Markdown headers (#1557) This PR fixed markdown header of the form: ``` Überschrift ----------- ```
Andre Hotzler a2230c38 2018-11-28T14:26:31 Add additional commands to bash (#1577) Includes "apt", "apt-cache" or "parted" and others.
Michael Schmidt 9d2fddc2 2018-11-28T14:21:20 Added strike support to markdown (#1563) This PR adds support for the strike operator in [both forms][1]. It does not include actual styling for the strike operator as it makes the ~ character really hard to read. [1]: https://webapps.stackexchange.com/questions/14986/strikethrough-with-github-markdown/103691#103691
Michael Schmidt 7ea2ff28 2018-11-24T10:54:26 Added the comma to the list of CSS punctuation
Chris Johnston 1c5f28a9 2018-10-29T12:00:54 Allow YAML strings to have trailing comments (#1602) Updates the string regex to allow for strings that may have a trailing '#'. This uses a different pattern from other regex patterns, because only the string regex pattern is greedy, while the others are not. Fix #1601.
Marius Schulz 8720b3e6 2018-10-25T20:56:57 Adds support for comments in JSON (#1595) While JSON doesn't explicitly support comments, they're commonly used and there are supersets of JSON that do make comments available. PrismJS is not a linter, and this is a useful feature to include when displaying JSON.
Damien Jarry 0d73f7f5 2018-10-19T22:48:21 Add new keywords to nginx (#1587) Adds some missing keywords to the nginx language.
Олег Дутченко c1d6cb85 2018-10-19T04:06:02 Fix tokenizing !important (#1585) Updates the regex to ensure that when `!important` sits next to a property with no spaces, it's still tokenized correctly.
Michał Lytek 11695629 2018-10-18T20:34:53 Enhance definitions in TypeScript component (#1522) Add missing keywords & built-ins to the TypeScript definition.
Michael Schmidt f96b083a 2018-09-23T15:20:05 F#: Chars can only contain one character (#1570) This PR fixes #1480.
Michael Schmidt a47c05ad 2018-08-28T05:39:08 Fixed lowercase supposed class names (#1544) This PR fixes a bug with supposed class names. Lowercase supposed class names are no longer highlighted. **Before**: ![before](https://user-images.githubusercontent.com/20878432/44656379-e7c17900-a9f8-11e8-8b1a-7f1dd694263e.png) **After**: ![after](https://user-images.github usercontent.com/20878432/44656379-e7c17900-a9f8-11e8-8b1a-7f1dd694263e.png)
Michael Schmidt 2b62e57b 2018-08-23T22:20:26 Added support for JS BigInt literals (#1542) Add support for BigInt literals to JS and languages extending or including JS.
Michael Schmidt 42d119a2 2018-08-23T16:47:45 SQL Quoted variables are now greedy (#1510) Behavior with quoted variables was incorrect for SQL. This fixes that issue by introducing a new regex for variables and making the current regex greedy. Fixes #1509.
Michael Schmidt 3e1a9a3d 2018-08-20T16:22:11 React component tags are styled as classes in JSX (#1519) The PR adds a class-name alias to all the tags of React components. Tags which start with an uppercase letter are considered React components. HTML tags remain unchanged. Fixes #1518.
Michael Schmidt c40f6047 2018-08-19T20:28:57 Highlighting of supposed classes and functions (#1482) Fixes #1471. It also extends function-variable to include object properties. e.g. ```js {foo: function() {}} ```
Michael Schmidt 7af8f8be 2018-08-19T17:09:29 C/C++/Java operator update (#1528) This PR extends and updates the operators of C, C++, and Java. Java and C++ now support the -> operator. (C++ had a bug.) The tests of all languages were updated and the operator pattern for each language is now shorter.
Michael Schmidt a59a7926 2018-08-19T16:47:52 Added support for quote escapes to SQL strings (#1500) Fixes #1454. Quotes that are escaped by using the same quote twice (e.g. 'It''s me') are now supported.
Michael Schmidt ebd1b9a6 2018-08-19T16:06:34 Fix regex for `catch` and `finally` (#1527) When called as methods on a promise chain, the current regex would mark `catch` and `finally` as keywords. This regex improvement ensures they're only caught as part of a `try / catch` block, and are marked as functions as part of the promise chain.
Andrew Assarattanakul 74fe81c6 2018-07-21T14:10:18 Fix bugs in JSON language * Fix numbers to include negative numbers. * Remove hexidecimal from numbers it is not a valid value. * Remove ) and ; from punctuation they are not valid punctuation. * Include missing tests for punctuation and operators.
Jakub Jankiewicz 12a827e7 2018-07-07T14:56:36 fix function without arguments in scheme language (#1463) * fix function without arguments in scheme language * update tests for scheme
James DiGioia 5f04f4d4 2018-06-16T11:34:56 Merge pull request #1440 from PrismJS/fix-solidity-protocol Fix Swift protocol
mAAdhaTTah 2c6b6a42 2018-06-11T20:57:22 Fix Swift protocol test
mAAdhaTTah 791f4000 2018-05-27T17:46:52 Add tests Also fix up the patterns in light of said tests & code review.
Golmote e326cb03 2018-05-26T11:39:35 Add support for XQuery. Fix #1405 (#1411)
Golmote 38ce1213 2018-05-15T20:27:53 JSX: Add support for fragments short syntax. Fix #1421
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 f1cd7c56 2018-04-27T08:56:19 JSX: Allow for two levels of nesting inside JSX tags. Fix #1408
Golmote a349c0cd 2018-04-27T08:47:54 Add missing reference to issue in specific test.
Golmote 9272d6f4 2018-04-27T08:27:02 Powershell: Allow for one level of nesting in expressions inside strings. Fix #1407
Golmote db2d0ebb 2018-04-22T15:12:28 JavaScript: Add support for one level of nesting inside template strings. Fix #1397
Golmote dac0485e 2018-04-17T00:25:03 Elixir: Fix attributes consuming punctuation. Fix #1392
Golmote 5b043cf8 2018-04-13T08:59:26 JavaScript: Improve Regexp pattern
Limo Saplf 1bf73b0b 2018-04-13T14:18:38 Add keywords of Kotlin and modify it's number pattern. (#1389) * Add keywords & modify number pattern. - Missing keywords by the creator: vararg dynamic infix operator; - New keywords by Kotlin 1.1&1.2: suspend typealias external expect actual; - Remove keyword 'to' as it just a common function name; - Add seperator '_' for the number iteral; - Prefix of hexadecimal and binary can also be capital. * Fix the wrong format of test file.
Thomas Stapleton f6e81cb4 2018-04-11T23:08:00 HTTP: Absolute path is a valid request uri (#1388)
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 1bfc0848 2018-04-08T11:44:07 Bash: Add curl to the list of common functions. Close #1160
Golmote 04df41b3 2018-04-07T10:18:57 Eiffel: Fix verbatim strings. Fix #1379
Juan Caicedo 46468f84 2018-04-05T12:24:22 Add support for Lisp (#1297) * add emacs * rename to elisp * add elisp to components * add comment test * add heading test * WIP string test * update string tests * test symbols in strings * test arguments * test quoted symbol * lisp-property test * splice test * add keyword test * test for declare * test interactive * boolean test * test numbers * test defvar * fix greedy defun regex * test defun * test lambda * test car * test punctuation * use var instead of const * remove arrow functions * flatten language structure * remove unnecessary escaping * add lisp and emacs * add lisp * fix template strings * minify lisp * add example elisp file * simplify number * don't mark other def as keywords * dont mark other def as keyword in defun * make lambda a keyword only at the beginning * restore single quotes in components * double quote in elisp * minify elisp * quote keys in components * rename punctuation test * add semicolons elisp * undo prettier changes to components.js * add lisp to components.json * rename elisp to lisp * fix components.json * add minified lisp file * rename example lisp file * move lisp to first position * explain null initialized properties in lisp file * remove trailing commas * put lisp first in example file * add ifee for lisp file * update lisp min file * update show language assets * add components index min file * add emacs-lisp alias * change title of lisp example file * undo theme change * combine regex for parens * remove min index * remove unneeded example html * remove doubled string test * capitalize lisp in components * change string theme to match master * build assets after adding lisp
Golmote 7c7602b4 2018-04-05T09:05:22 Test suite: Delete unused run-child.js file
Golmote 9bceece8 2018-04-05T09:01:04 Test suite: Memory leak in vm.runInNewContext() seems fixed. Revert 9a4b6fa3ec770a382eccc149b849cc1c3112aa53 to drastically improve tests execution time.
Golmote 46e6f0c0 2018-04-05T08:51:43 Test suite: Fix indentation in test-case.js
Golmote 238b1952 2018-04-05T08:33:59 SQL: Add missing keywords. Fix #1374 UNLOCK, PREPARE, LOOP, ITERATE, REPEAT, LEAVE, RESIGNAL
Golmote 0a95f69d 2018-03-28T20:05:45 C#: More specific class-name highlighting. Fix #1371
Golmote 13d99915 2018-03-26T21:15:10 D: Update known failures and tests.
Golmote b0e34fbe 2018-03-26T21:12:08 Ruby: Make multi-line comments greedy, remove single-line comment hack. Update known failures and tests.
Golmote a0f50811 2018-03-26T21:09:07 Q: Make comments greedy. Update known failures and tests.
Golmote 0c139d1f 2018-03-26T21:05:43 Puppet: Make heredoc, comments, regexps and strings greedy. Update known failures and tests.
Golmote d7b2b43c 2018-03-26T21:00:12 Monkey: Make comments greedy. Update known failures and tests.
Golmote e93d61f3 2018-03-26T20:57:31 Elixir: Make regexps greedy, remove comment hacks. Update known failures and tests.
Golmote c083b78c 2018-03-26T20:54:34 Fortran: Make single-line comments greedy. Update known failures and tests.
Golmote 571f2c50 2018-03-26T20:53:20 C-like: Make single-line comments greedy. Fix #1337. Make sure #1340 stays fixed.
Golmote 294efaae 2018-03-26T20:48:26 Core: Greedy patterns should always be matched against the full string. Fix #1355
Golmote 172d351a 2018-03-26T20:11:41 JavaScript: Improve Regex matching
Golmote 9084481f 2018-03-26T09:17:05 JavaScript: Add support for constants. Fix #1348
Golmote 0414a2db 2018-03-26T09:01:51 Java: Fix wording in test