Log

Author Commit Date CI Message
mAAdhaTTah c2229ec2 2019-07-21T22:07:17 Add .DS_Store to npmignore Keeps these from being published.
mAAdhaTTah a7030277 2019-07-21T22:05:51 1.17.0
mAAdhaTTah fee59060 2019-07-21T22:05:42 Add date to CHANGELOG
Michael Schmidt b1852951 2019-07-22T04:01:07 Changelog for 1.17.0 (#1989)
Michael Schmidt 05823e88 2019-07-22T02:07:42 Markdown: Added support for auto-loading code block languages (#1898) This lets Markdown load embedded languages using the Autoloader plugin which now exposes the `loadLanguages` function. This also changes `loadLanguages` to always invoke callbacks asynchronously and to invoke error callbacks only once.
Michael Schmidt e7702ae1 2019-07-22T01:27:48 Diff: Added support for syntax highlighting inside diff blocks (#1889) This adds support for syntax highlighting inside diff blocks via a new plugin called: Diff Highlight.
Michael Schmidt c8844286 2019-07-21T22:59:46 Highlight JS tagged template literals (#1931) This adds support for highlighting embedded languages in JavaScript tagged template literals.
Michael Schmidt 452d5c7d 2019-07-21T20:06:02 Autoloader: Improved component path guessing (#1928) This changes the behavior of how the Autoloader handles `data-autoloader-path` attributes and guesses the components path. The CDN example on the front page was also updated.
realfresh f1e16c7b 2019-07-21T00:00:18 Added tutorial for using Prism.js with React (#1979)
Michael Schmidt cedb8e84 2019-07-20T13:07:52 Markdown: Added tables (#1848) This adds support for Markdown tables and improves the matching of headers and code blocks.
RunDevelopment a3a6d9ee 2019-07-20T12:59:11 Resolved conflict
Michael Schmidt 8b5d67a3 2019-07-20T12:54:25 reST: Fixed exponential pattern (#1986) This fixes the exponential backtracking of the second `link` pattern.
Michael Schmidt 5d992fc5 2019-07-20T12:52:48 Added basic support for LilyPond (#1967) This adds very basic support for LilyPond. More advanced features weren't implemented because the author (me) has no idea about music.
Michael Schmidt c93c066b 2019-07-20T12:35:15 Added support for Splunk SPL (#1962) This adds support for Splunk SPL and corrects the position of the SQL in `components.json`.
Michael Schmidt e8811d22 2019-07-20T03:18:01 Scheme: Added support for rational number literals (#1964) This adds support for rational numbers like `2/3`.
Michael Schmidt 033c5ad8 2019-07-19T16:20:45 gulp: Split gulpfile.js and expanded `changes` task (#1835) This splits the `gulpfile.js` files into multiple files and expands the `changes` tasks to generate a commit-based changelog.
ExE Boss 0dd44d53 2019-07-17T21:22:24 gulp: Use `async` functions & drop testing on Node v6 (#1783) This refactors the `gulpfile.js` to use async/await for clearer code. It also drops testing for all NodeJS versions before NodeJS v8 because they don't support async/await.
Christian Oliff bab744a6 2019-07-16T18:39:45 Update footer's GitHub repository URL and capitalisation of "GitHub" (#1983) This updates the Prism repository linked to in the footer and corrects the capitalization of the name "GitHub".
Michael Schmidt bb84f98c 2019-07-15T23:22:20 Added support for DNS zone files (#1961) This adds support for DNS zone files. The highlighting is quite simple as every type and class is highlighted as `keyword`. This is intentional as other token names (e.g. `class-name`, `function`, `builtin`, ...) are not highlighted by every theme resulting in large portions of unstyled text for some themes.
Michael Schmidt 7d056591 2019-07-15T22:59:33 Fixed typo in Funky theme (#1960) The `.toke.variable` selector has been fixed to be `.token.variable`.
Michael Schmidt b9ec6fd8 2019-07-13T15:52:36 Markdown: Improved URLs (#1955) This fixes the known issue that inline styles (bold, italic, strike) break URLs. Inline styles are now properly highlighted inside URLs.
Michael Schmidt d58d2aeb 2019-07-13T15:41:07 F#: Improved character literals (#1956) This adds support for all F# character escapes which should result in all characters being highlighted as such. The problem was that character literals with escape sequences longer than two characters were not recognized.
Michael Schmidt 11f18e36 2019-07-13T15:06:09 Download page: Improved performance for Chromium-based browsers (#1907) This significantly reduces the time it takes to highlight the code of Prism on the download page in Chromium-based browsers. It does this by creating a new DOM node and highlighting the code in this detached node which seemingly helps Chromium to optimize its layout recalculations.
Michael Schmidt 7bd08327 2019-07-13T13:42:13 JavaScript: Private fields (#1950) This adds support for private fields in both JS and JS Extras. [Proposal](https://github.com/tc39/proposal-class-fields#private-fields).
Michael Schmidt 9d9e2ca4 2019-07-11T16:28:49 Removed env.elements in 'before-highlightall' hook (#1968) This removes the `env.elements` property from the environment of the `before-highlightall` hook. **Why?** - There is no plugin that is using it. - It is inherently incompatible with `env.selector`. Even if a plugin using `elements` wanted to respect `selector` it would not be able to because 1) there might be plugins after it (in `before-highlightall`) extending the selector and 2) the plugin has no access to the current `container`. **Isn't this a breaking change?** Yes, but I don't think that this will have any impact for the above reasons and because from a user perspective, it's hard to use than just iteration over your elements and calling `Prism.highlightElement` yourself.
dovisutu 4a2c90c1 2019-07-11T22:05:49 Visual Basic: Added support for interpolation strings (#1971) This makes string like `$"Foo bar"` highlight with `$`.
Brice Aldrich 858201c7 2019-07-10T21:45:22 Added support for PascaLIGO (#1947) This adds support for the [PascaLIGO language](http://ligolang.org).
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 de10bd1d 2019-07-01T19:55:12 Protobuf improvements (#1948) This makes numerous improvements to the Protobuf grammar adding (almost) full support for PB2 and PB3 syntax.
Michael Schmidt 36a5fa0e 2019-06-30T04:19:54 Known failure page (#1876) This PR adds a known failures page. This resolves #1750. The known failures are moved from the example pages. (I also updated all example pages with invalid HTML.) Some known failures were actually fixed in the meantime but never updated, so I removed a few. Those were: - Handlebars - Markdown's nested bold-italic - Smarty - Textile's "Nested styles are only partially supported" ### Screenshot <details> ![image](https://user-images.githubusercontent.com/20878432/56849438-7eca3200-68f4-11e9-9dc3-bf0256be8d1e.png) </details>
Michael Schmidt a16d4a25 2019-06-30T03:59:48 Examples improvements (#1919) This PR makes some improvements to the examples website: 1. `fileExists` will now also check local files, so that newly added examples can be viewed. (Requires localhost) 1. `update` now uses `Prism.highlightAllUnder` instead of the self-constructed copy of it. 1. Some formatting.
Michael Schmidt 922ec555 2019-06-30T03:54:26 Website: Added basic usage for CDNs (#1924) Per [suggestion](https://github.com/PrismJS/prism/issues/1922#issuecomment-497681398) by @foxycode, I added an example for the usage of Prism with CDNs.
Michael Schmidt d673d701 2019-06-30T03:42:07 README: Added npm downloads badge (#1934) This adds an npm downloads/week badge to Prism's readme which also links our npm page for a little extra promotion.
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`.
Michael Schmidt 24c8e717 2019-06-30T00:11:14 Extending page: Fixed typo + new alias section (#1949)
Michael Schmidt b6543853 2019-06-30T00:00:14 Update website page styles to not interfere with themes (#1952) This changes the `style.css` to not interfere with themes. The problem was that `* { ...; font-weight: normal; }` caused markdowns bold text to not be rendered as bold. <details> <summary>Style inheritance</summary> ![image](https://user-images.githubusercontent.com/20878432/60092675-e90e2000-9747-11e9-8b16-73bf3e219001.png) </details> The fix is quite simple: I just removed the `font-weight: normal;` line. The only elements (besides the bold tokens) that changed were `h2`s, so they get a new rule. In a side-to-side comparison, I wasn't able to spot any other differences. Result: ![image](https://user-images.githubusercontent.com/20878432/60092899-5e79f080-9748-11e9-955c-bd3645fc018e.png)
Marcus Kazmierczak 5ab28bbe 2019-06-25T12:29:20 Add className option for toolbar items (#1951) Allows for passing in a className when registering a toolbar button to allow to target via CSS. An example: ```js Prism.plugins.toolbar.registerButton( 'my-button', { text: 'My Button', className: 'my-button', }); ``` This will add the span element `<span class="my-button">My Button</span>` .
RunDevelopment 6b4b2d2b 2019-06-25T03:13:29 Removed unnecessary `lookbehind: true`
Michael Schmidt 5d191b92 2019-06-25T03:08:02 Download page: Fixed Edge's word wrap (#1920) This makes the word break behavior consistent in all browsers.
RunDevelopment e2c56f04 2019-06-24T23:11:51 Resolved conflicts
Michael Schmidt 11903721 2019-06-24T22:44:18 Markdown: Added support for complexly nested bold and italic expressions Some Markdown expressions which are both bold and italic (e.g. `***abc***`) were not correctly matched until now. This solves this issue.
RunDevelopment 84b9651b 2019-06-24T15:51:46 Rebuilt Prism
RunDevelopment 9c75843a 2019-06-24T15:48:11 Improved inline pattern creation + more comments
RunDevelopment 986c9de0 2019-06-24T15:43:49 More strike tests
RunDevelopment 235fce74 2019-06-24T14:47:41 Improved tests
Michael Schmidt f571cfce 2019-06-14T17:34:53 Perl: Added `return` to keywords.
Paul "LeoNerd" Evans b52a16b4 2019-06-14T16:30:13 Rebuild prism-perl.min.js
Paul "LeoNerd" Evans 4a0ed18d 2019-06-14T16:13:46 Add new keyword to the keyword test file
Paul "LeoNerd" Evans 2f39de97 2019-06-14T15:38:43 Add 'return' to recognised keywords
Michael Schmidt 31fb8bc5 2019-06-12T15:50:04 Added support for Shell sessions This adds support for a Shell session pseudo language.
RunDevelopment 0b48301e 2019-06-12T15:46:07 Resolved conflicts
Michael Schmidt 6f53f749 2019-06-12T15:31:52 Added support for $$ equations (#1916)
Michael Schmidt 3e181241 2019-06-12T15:28:44 Added more examples & small TOML improvement (#1917) This adds some of the missing examples and makes a small improvement to TOML.
Michael Schmidt 4b6b6e8b 2019-06-12T15:21:10 SCSS: Fixed exponential time failing of url pattern (#1938) The url pattern used to fail in exponential time for some input strings. This fixes this issue.
dovisutu feb1b6f5 2019-06-12T19:34:29 Add the 'struct' keyword to Julia (#1941) Added to the key word list and updated tests.
Alice M 363281b3 2019-06-10T13:29:03 Bash improvements (#1443) A bunch for improvements for Bash.
Michael Schmidt c33cf459 2019-06-09T10:37:20 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 73d964be 2019-06-08T20:15:08 Added support for JQ language (#1896) This adds support for the JQ language.
Michael Schmidt 0853e694 2019-06-08T20:09:17 The test page now uses prism-core.js instead of prism.js (#1908) Instead of `prism.js`, the test page will now use `prism-core.js`. This means that Markup, CSS, C like, and JS are not included by default which will cause them to behave like any other language.
Michael Schmidt 3ba786cd 2019-06-02T15:08:24 Tests: `lookbehind` test for patterns (#1890) This adds a test which whether `lookbehind` (if set to `true`) is necessary for a given pattern.
Michael Schmidt a8164559 2019-06-02T14:36:05 C#: Added `cs` alias (#1899)
James DiGioia 0b1662dd 2019-06-01T18:24:44 Toolbar: Set opacity to 1 when focus is within (#1927) This ensures interacting with the toolbar with the keyboard makes it visible to the user.
James DiGioia 79880197 2019-06-01T17:08:39 Copy to clipboard: Switch anchor to button (#1926) This changes the anchor element into a button which fixes that the element is not tabbable.
Michael Schmidt ddf81233 2019-06-01T17:05:27 Docs: Added "Creating a new language definition" section (#1925) This adds a new "Creating a new language definition" section explaining the workflow of creating a new lang. def..
dvdhansen 2141129f 2019-05-28T23:07:39 Julia: Highlight ‘Inf’ and ‘NaN’ as constants (#1921) This highlight `Inf`, `NaN` and all of their variants as constants.
dvdhansen feb3187f 2019-05-28T21:38:42 Julia: Add the ’in’ keyword (#1918) Added the missing `in` keyword.
Michael Schmidt 5ad58a75 2019-05-28T18:25:04 LaTeX: Added TeX and ConTeXt alias (#1915) Added TeX and ConTeXt alias. Some minor formatting.
Michael Schmidt 3de29e72 2019-05-28T14:23:02 C++: Fixed C++ number pattern (#1887)
RunDevelopment d4736f08 2019-05-28T14:14:05 Added support for $$ equations
Michael Schmidt 03cf85b0 2019-05-18T20:56:47 Added support for nested bold and italic tokens
Michael Schmidt 6068bf18 2019-05-18T17:57:47 JS: Added support for numeric separators (#1895) This adds support for JavaScript's new numeric separators. E.g. `123_456`.
RunDevelopment 96044979 2019-05-15T21:06:59 Added shell session language
Michael Schmidt f0a10669 2019-05-15T13:41:05 CSS: Extended `url` inside (#1874) This extends the highlighting of the CSS `url` pattern adding highlighting for punctuation and the `url` function.
Michael Schmidt 5e5a3e00 2019-05-12T14:14:03 CSS-Extras: Added `even` & `odd` keywords to `n-th` pattern (#1872) `even` and `odd` are keywords which are also an `n-th` value. This adds it to the pattern which previously only captured values of the form `an+b`.
Michael Schmidt 74050c68 2019-05-12T14:10:17 CSS: Removed useless flag and modifier (#1875) This cleans up CSS' at-rule pattern.
Michael Schmidt f8ae465d 2019-05-12T14:07:58 JSONP Highlight: Fixed examples (#1877) This fixes an example on the JSONP Highlight page.
Michael Schmidt acceb3b5 2019-05-08T17:02:27 Custom class: Added mapper functions for language specific transformations (#1873) This adds support for mapper function to the `map` function, allowing for language-specific transformations.
Matt Chaffe 632ce00c 2019-05-07T23:21:49 Line highlight: Batching DOM read/writes to avoid reflows (#1865) This batches DOM read and write operation to avoid reflows resulting for better performance.
Ralf Biedert 4faa3314 2019-05-07T20:09:47 Add async / await keywords for Rust. (#1882)
libantema c24831b5 2019-04-27T11:28:47 Command line: Fix for uncaught errors for empty 'commandLine' object. (#1862) This fixes the issue that the Command line plugin throws an error when the 'commandLine' object is not defined/an empty object. This always happens when an element with no text is highlighted.
Michael Schmidt 59d4323f 2019-04-25T19:54:58 Copy to clipboard: Fixed typo (#1869) This fixes a small type in the webpage of the copy to clipboard plugin.
Michael Schmidt cbe05ec3 2019-04-23T20:52:47 JSON: Kinda fixed comment issue (#1853) This is a partial workaround for the greedy matching bug so that pure JSON will always be matched correctly while JSON + comments might suffer from some issues.
Michael Schmidt 77e403cb 2019-04-23T09:18:01 Readme: Minor changes (#1857) Minor changes to the `README.md`. A few updated links and a few new sentences.
Michael Schmidt fd691c52 2019-04-23T00:33:15 Core: Made `language-none` the default language (#1858) This makes `language-none` the default language of a highlighted element in the case that no `language-xxxx` class is provided or inherited.
Michael Schmidt c1e6a7fd 2019-04-23T00:30:37 Tests: Added test for empty regexes (#1847) This adds a new test which checks all regexes to not match the empty string.
Michael Schmidt eb28b62b 2019-04-19T22:10:04 Autolinker: Improved URL regex (#1842) This changes the regex for matching URLs to include the `@` character and improves the pattern to avoid backtracking.
Michael Schmidt c13d6e7d 2019-04-19T22:07:57 JS: Template strings: Increased bracket count of interpolations (#1845) This increases the number of nested braces which can be matched by JS's template pattern to supported nested objects within interpolation expressions.
Michael Schmidt 9e164935 2019-04-19T21:56:52 Added support for `s` regex flag (#1846) This adds support for the ES2018 `s` (dotall) flag for regular expressions.
Karl Kaufmann d2089d83 2019-04-08T04:23:37 New tutorial for Drupal (#1859) This adds a new tutorial.
Michael Schmidt a42b1557 2019-04-07T13:29:46 Rust: Improved punctuation and operators (#1839) This improves Rust's existing punctuation and operators, adds support for new ones, and updates the tests.
Andrey e2683959 2019-04-03T11:30:49 Javascript: Added missing semicolon (#1856)
Michael Schmidt 2f9c9261 2019-03-31T09:50:19 Clearer description for the highlighting bug report template (#1850) This makes the description of the plugins info in the highlighting bug report template a little clearer.
Michael Schmidt 828d7ec0 2019-03-30T17:48:09 Added markdown tables
Michael Schmidt 65a4e894 2019-03-28T23:47:49 Removed `parent` from the `wrap` hook's environment (#1837) This removes the `parent` property of the `wrap` hook and the parameter from `Token.stringify`.
Daniel Ferguson 0f16eb87 2019-03-26T03:24:51 Line numbers: Fixed typo on webpage (#1838) This corrects a small typo on line number's webpage.
mAAdhaTTah 886698d5 2019-03-24T19:00:38 1.16.0
mAAdhaTTah 695dddce 2019-03-24T14:35:20 CHANGELOG for v1.16.0
mAAdhaTTah 3abaf68d 2019-03-24T14:35:05 Add command to generate CHANGELOG This forms the basis of the CHANGELOG, but the commits need to be formatted with the linkify command and sorted into the various sections.
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.