extending.html


Log

Author Commit Date CI Message
Anders D. Johnson dfa5498a 2020-07-03T12:40:39 Website: Fixed typos "Prims" (#2455)
Michael Schmidt 91fdd0b1 2020-06-28T01:58:55 Website: New assets directory for all web-only files (#2180)
Michael Schmidt 4ff555be 2020-06-28T01:34:29 Added JSDoc (#1782)
Michael Schmidt ff74a610 2020-06-12T18:42:12 Added `npm run build` command (#2356)
Michael Schmidt ce0fa227 2020-05-07T13:40:37 Website improvements (#2053)
Michael Schmidt 59068d67 2020-01-05T20:03:41 Added documentation for new dependency API (#2141)
Jakub Klímek 7cb65eec 2019-08-05T13:16:32 Fixed alias example in extending page (#2011) This fixes the example on how to add a language alias to a language definition.
Michael Schmidt 24c8e717 2019-06-30T00:11:14 Extending page: Fixed typo + new alias section (#1949)
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..
Michael Schmidt 439ea1ee 2019-03-11T00:32:45 Added scripts directory (#1781) This adds a new `scripts` directory for all scripts used exclusively by the prismjs.com website.
Michael Schmidt 18f2921d 2019-03-10T21:40:02 Docs: Added missing parameter (#1774) This adds a missing parameter to the `Prism.highlight` documentation.
Michael Schmidt 74916d48 2018-08-19T16:54:25 Fixed empty link in extending (#1507)
Valtteri Laitinen d95f8fb4 2018-04-22T15:55:38 Use rel="icon" instead of rel="shortcut icon" (#1398)
Valtteri Laitinen 95146c8f 2018-04-17T01:28:42 Use HTTPS / canonical URLs (#1390) Also, remove the broken link in `/index.html`.
Golmote eba02358 2018-03-04T16:24:32 Docs: Add note on `async` parameter to clarify the requirement of using a single bundled file. Closes #1249
Golmote 6e50d440 2017-12-05T20:17:39 Core: Update API doc to document `Prism.highlightAllUnder()`
Andreas Rohner 2746d7f3 2016-04-30T09:48:39 Document the newly added greedy-flag
Andreas Rohner 5b78124e 2016-04-30T09:48:11 Fix whitespace in extending.html
Lea Verou 80aedb2a 2015-08-26T14:49:26 Updated documentation since the example was not relevant any more
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 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 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 },
Lea Verou 87d7640e 2013-10-07T09:46:33 Moved themes to themes/ folder
Dido Arellano 2ca412e4 2013-09-09T22:07:55 Use Prism.languages.markup as grammar examples Prism.languages.html doesn't exist. The grammar for HTML is Prism.languages.markup.
Lea Verou 97d57c65 2013-05-19T00:35:29 Split the components registration object into its own file
Lea Verou 9863ad72 2012-07-31T18:44:17 Added Google Analytics
Lea Verou 571ca0a5 2012-07-31T18:39:29 Added favicon
Lea Verou 9ed86b86 2012-07-31T18:14:55 Styling and docs changes
Lea Verou e95a85c0 2012-07-31T16:17:53 Merged the comment and line-comment tokens
Lea Verou b2505655 2012-07-29T00:35:02 Docs update, minor styling changes
Lea Verou 54e2eeab 2012-07-29T00:26:50 Added (and documented) Prism.languages.insertBefore
Lea Verou bd4e8d15 2012-07-23T18:54:30 ALL THE THINGS! Most notably: Simple templating, API changes, show invisibles plugin, download (build) page