Log

Author Commit Date CI Message
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.
Michael Schmidt d33d259c 2018-12-02T00:02:57 Ignore duplicates in insertBefore (#1628) Fix #1525 and implement option number 2.
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 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 e2f2fd19 2018-12-01T21:19:37 Reuse CSS selector pattern in CSS Extras (#1637) The CSS extras for the selector now use the CSS selector pattern.
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.
James DiGioia 1b812386 2018-12-01T13:51:35 CSS: Comma punctuation (#1632) * Show invisibles inside tokens * Revert "Show invisibles inside tokens" This reverts commit 2d622f17e4f6d746e8f4fa211c7f6b7ccb3f27b4. * Added the comma to the list of CSS punctuation
Michael Schmidt 39686e12 2018-12-01T19:51:08 Remove unused `insertBefore` overload (#1631) Mentioned in #1505.
Michael Schmidt c988936b 2018-12-01T19:46:13 Resolved merge conflict
Michael Schmidt 59f841e5 2018-12-01T19:43:44 Merge remote-tracking branch 'upstream/master'
Michael Schmidt 6e0c6e86 2018-12-01T19:41:17 Corrected load order of Show Invisibles (#1612) Correct the load order of Show Invisibles, Autolinker, and Data-URI Highlight, so that Show Invisibles is loaded after the others. Details in #1609.
Michael Schmidt 5ded688a 2018-12-01T19:38:13 Merge remote-tracking branch 'upstream/master'
Michael Schmidt 0536fb14 2018-12-01T19:06:04 Move SCSS `property` definition (#1633) This PR cleans up the SCSS language definition a little by moving the definition of `property` inside the `extend` object. Also remove useless `i` flag.
Michael Schmidt 86d31793 2018-12-01T18:58:10 Remove useless insertBefore in LESS (#1629) Remove an `insertBefore` call which was intended to swap the order of `punctuation` and `function`. But as `function` is already before `punctuation` (in [CSS](https://github.com/PrismJS/prism/blob/master/components/prism-css.js#L18)), it doesn't do anything.
Michael Schmidt 654b527b 2018-12-01T18:56:35 Display language aliases (#1626) Change the index and download page of the Prism website. The index page will now display the aliases (for `language-xxxx`) of languages and the download page will display all alias title of a language next to it.
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).
RunDevelopment 21033636 2018-11-29T15:49:04 Merge remote-tracking branch 'upstream/master'
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 5db04656 2018-11-29T13:48:20 Mention Prism Themes in README (#1625)
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 ----------- ```
RunDevelopment 24ad1df4 2018-11-28T14:55:51 Merge remote-tracking branch 'upstream/master'
Michael Schmidt 2864fe24 2018-11-28T14:54:29 Improve `Prism.util.type` performance (#1545) Drop the regex in favor of a faster `slice` call.
Олег Дутченко 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.
Andre Hotzler a2230c38 2018-11-28T14:26:31 Add additional commands to bash (#1577) Includes "apt", "apt-cache" or "parted" and others.
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.
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 7155e60f 2018-11-28T14:04:11 Remove batch's shell alias (#1543) Both Batch and Bash have `shell` as their alias but only Bash has an alias title for `shell`.
Michael Schmidt 7ea2ff28 2018-11-24T10:54:26 Added the comma to the list of CSS punctuation
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.
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.
Michael Schmidt da474c77 2018-10-26T02:20:21 Cleaned up JSON (#1596) This PR removes useless flags (because JS is case sensitive, so is JSON) and adds one to number to make the pattern more compact.
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.
Michael Schmidt 6d1a2c61 2018-10-25T21:55:21 Update README.md (#1553) Make some minor modifications to make contributing clearer.
Ran Luo bfbe4464 2018-10-24T04:08:51 Invoke `callback` after `after-highlight` hook (#1588) Previously, `callback`, as passed to `Prism.highlightElement`, would get called before all of the hooks had been run. This moves it after all the hooks, so it can truly be considered a "complete" callback. This could be a breaking change for any userland modifications that were expecting `callback` to fire before plugins, but we expect this change to mostly conform with user expectations and consider this a bugfix..
Michael Schmidt b41fb8f1 2018-10-22T15:47:13 Fixes regex for JS examples (#1591) This PR fixes a regex example which Prism does not highlight correctly because it is preceded by a comment.
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.
Amila Welihinda 716923f4 2018-09-23T06:21:03 Add travis repo badge to readme (#1561)
Michael Schmidt f96b083a 2018-09-23T15:20:05 F#: Chars can only contain one character (#1570) This PR fixes #1480.
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 b520e1b6 2018-09-09T18:33:43 Simplify function pattern of C-like language (#1552) `/[a-z0-9_]/i` == `/\w/`
Benjamin Winterberg 8c981a22 2018-09-06T13:33:07 Add Java 10 support (#1549) Add `var` as a new keyword–added in Java 10: https://developer.oracle.com/java/jdk-10-local-variable-type-inference
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 0f75d9d4 2018-08-19T18:18:03 Fixed that selector pattern can take exponential time (#1499) Fixes #1498.
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.
Valtteri Laitinen e63d1597 2018-08-19T17:56:44 Set default indentation size (#1516) Updates the .editorconfig to display tabs as four spaces.
Thomas Steiner c322fc80 2018-08-19T16:55:06 Correct typo (#1508) Corrects “accomodate” to spell “accommodate”.
Michael Schmidt 74916d48 2018-08-19T16:54:25 Fixed empty link in extending (#1507)
Michael Schmidt 2fb66e04 2018-08-19T16:50:41 Added missing aliases to components.json (#1503) Also enforced `alias` before `owner`.
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 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.
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.
Michael Schmidt 9dfec340 2018-08-18T22:04:51 `insertBefore` now correctly updates references (#1531) Removes some workarounds for misplacing the reference when using `insertBefore`.
Michael Schmidt 9d15ff6e 2018-07-22T05:47:02 Fixed peer dependencies in download page (#1491) Update the download page to properly order components when they have peer dependencies.
Michael Schmidt b1c2f4df 2018-07-21T21:48:45 Improve download page typography (#1484) Fix some of the texts from breaking in weird ways.
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
Golmote 2a100db7 2018-07-06T21:52:48 Linkify changelog more + add missing PR references
Shivang Saxena 7418dfdd 2018-07-06T16:48:04 Updated index.html to fix broken instructions (#1462) * Updated index.html to fix broken instructions Requiring components without the "index.js" part and calling "loadLanguages" results in a function not found error for me. Adding index.js, as commented by @golmote, fixes that error. Ref: https://github.com/PrismJS/prism/issues/972 * Updated index.html to fix nodejs instructions Fixed the require so that nodejs does not give an error when requiring the loadLanguages function.
mAAdhaTTah e00b408f 2018-06-26T11:32:31 Remove extraneous class
Brandon Rhodes 334c7bca 2018-06-26T11:21:28 Add Python triple-quoted strings "known failure" (#1449) * Add example of failure in Python parser
mAAdhaTTah fedf03f6 2018-06-16T21:51:49 Linkify CHANGELOG
mAAdhaTTah 7d084d5f 2018-06-16T21:48:35 1.15.0
James DiGioia 5f04f4d4 2018-06-16T11:34:56 Merge pull request #1440 from PrismJS/fix-solidity-protocol Fix Swift protocol
James DiGioia 09b56af2 2018-06-16T11:34:41 Merge pull request #1430 from PrismJS/add-tap Add TAP component
mAAdhaTTah 41e3d6a6 2018-06-16T11:25:09 Update minified files
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.
mAAdhaTTah f2b19644 2018-06-11T21:11:23 Add Chinese translation Closes #750.
Ian Leitch 081e318c 2018-03-31T15:09:18 Fix Swift 'protocol' keyword
paladox f356dfe7 2018-06-05T22:28:05 Add .token.class-name to rest of themes (#1360) * Add .token.class-name to rest of themes * Update prism-okaidia.css * Update prism-solarizedlight.css
mAAdhaTTah 15957702 2018-06-05T16:13:14 Merge branch 'gh-pages' * gh-pages: (33 commits) Add double-class specificity hack (#1435) Moved tutorial link to the end of the list Make line-numbers styles more specific Fix mixed content warning Create CNAME Delete CNAME Update documentation for node & webpack usage Handle optional dependencies in `loadLanguages()` (#1417) Add `objectpascal` as an alias to `pascal` (see #1426) Add support for XQuery. Fix #1405 (#1411) Website: Fix Download page not handling multiple dependencies when from Redownload URL JSX: Add support for fragments short syntax. Fix #1421 Support for Template Toolkit 2 (#1418) ASP.NET should require C# Run gulp Move guard into conditional and check for language Don't process language if block language not set JSX: Allow for two levels of nesting inside JSX tags. Fix #1408 Add missing reference to issue in specific test. Powershell: Allow for one level of nesting in expressions inside strings. Fix #1407 ... # Conflicts: # components/prism-kotlin.js
James DiGioia c8c52071 2018-06-05T11:44:43 Merge pull request #1437 from ilaborie/patch-1 Kotlin: add `typealias` keyword
igor a21fdee6 2018-06-05T08:08:33 Kotlin: add `typealias` keyword
James DiGioia b848e9d6 2018-06-04T17:15:00 Add double-class specificity hack (#1435) Yeah, this isn't ideal, but it does work. Any other ideas?
James DiGioia 03e8d9cc 2018-06-03T10:02:49 Merge pull request #1434 from PrismJS/fix-line-numbers-specificity Make line-numbers styles more specific
James DiGioia 6584d5bb 2018-06-02T09:52:54 Merge pull request #1255 from teroauralinna/gh-pages Added Angular tutorial link
Tero Auralinna 854cc5b3 2018-06-02T11:35:44 Moved tutorial link to the end of the list
Tero Auralinna d6e064d1 2018-06-02T11:26:12 Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
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.