Lightweight, robust, elegant syntax highlighting.
Go to file
mAAdhaTTah 187c8a607e
1.21.0
2020-08-06 19:17:18 -04:00
.github/ISSUE_TEMPLATE Issue template improvements (#2069) 2019-09-26 16:46:43 +02:00
assets Website: New assets directory for all web-only files (#2180) 2020-06-28 01:58:55 +02:00
components JSON: Greedy comments (#2479) 2020-07-30 22:54:34 +02:00
docs Core: Fixed greedy matching bug (#2032) 2020-07-13 13:24:32 +02:00
examples Added support for Dhall (#2473) 2020-07-27 13:50:41 +02:00
gulpfile.js Changelog for v1.21.0 (#2507) 2020-08-06 17:44:57 +02:00
plugins Previewers: Fixed XSS (#2506) 2020-08-06 12:12:39 +02:00
tests JSON: Greedy comments (#2479) 2020-07-30 22:54:34 +02:00
themes Coy: Minor improvements (#2176) 2020-06-27 21:34:40 +02:00
.editorconfig Set default indentation size (#1516) 2018-08-19 10:56:44 -04:00
.gitattributes Add .gitattributes to prevent line ending changes in test files 2015-08-18 08:17:01 +02:00
.gitignore add Io syntax (#1251) 2018-01-02 08:58:10 +01:00
.jsdoc.json Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
.npmignore Added docs to ignore files (#2437) 2020-06-28 02:25:53 +02:00
.travis.yml Removed gulp `premerge` task (#2357) 2020-06-12 16:09:46 +02:00
CHANGELOG.md Changelog for v1.21.0 (#2507) 2020-08-06 17:44:57 +02:00
CNAME Added CNAME file 2012-07-31 11:59:25 +12:00
LICENSE Fixing to initial copyright year 2016-01-18 21:53:13 +05:30
README.md Added `npm run build` command (#2356) 2020-06-12 18:42:12 +02:00
bower.json Added docs to ignore files (#2437) 2020-06-28 02:25:53 +02:00
components.js Added support for Dhall (#2473) 2020-07-27 13:50:41 +02:00
components.json Added support for Dhall (#2473) 2020-07-27 13:50:41 +02:00
composer.json Name in composer.json set to lowercase (#1824) 2019-03-24 12:42:17 -04:00
dependencies.js Dependencies: Improved `getLoader` (#2151) 2020-01-05 19:46:54 +01:00
download.html Website: New assets directory for all web-only files (#2180) 2020-06-28 01:58:55 +02:00
examples.html Website: New assets directory for all web-only files (#2180) 2020-06-28 01:58:55 +02:00
extending.html Website: Fixed typos "Prims" (#2455) 2020-07-03 19:40:39 +02:00
faq.html Website: New assets directory for all web-only files (#2180) 2020-06-28 01:58:55 +02:00
index.html Website: New assets directory for all web-only files (#2180) 2020-06-28 01:58:55 +02:00
known-failures.html Website: New assets directory for all web-only files (#2180) 2020-06-28 01:58:55 +02:00
package-lock.json 1.21.0 2020-08-06 19:17:18 -04:00
package.json 1.21.0 2020-08-06 19:17:18 -04:00
prism.js JS: Improved regex detection (#2465) 2020-07-18 14:53:05 +02:00
test-suite.html Website: New assets directory for all web-only files (#2180) 2020-06-28 01:58:55 +02:00
test.html Website: New assets directory for all web-only files (#2180) 2020-06-28 01:58:55 +02:00

README.md

Prism

Build Status npm

Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from Dabblet.

You can learn more on prismjs.com.

Why another syntax highlighter?

More themes for Prism!

Contribute to Prism!

Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, considering giving back by sending a pull request. Here are a few tips:

  • Read the documentation. Prism was designed to be extensible.
  • Do not edit prism.js, its just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in the components/ folder. prism.js and all minified files are also generated automatically by our build system.
  • The build system uses gulp to minify the files and build prism.js. With all of Prism's dependencies installed, you just need to run the command npm run build.
  • Please follow the code conventions used in the files already. For example, I use tabs for indentation and spaces for alignment. Opening braces are on the same line, closing braces on their own line regardless of construct. There is a space before the opening brace. etc etc.
  • Please try to err towards more smaller PRs rather than few huge PRs. If a PR includes changes I want to merge and changes I don't, handling it becomes difficult.
  • My time is very limited these days, so it might take a long time to review longer PRs (short ones are usually merged very quickly), especially those modifying the Prism Core. This doesn't mean your PR is rejected.
  • If you contribute a new language definition, you will be responsible for handling bug reports about that language definition.
  • If you add a new language definition or plugin, you need to add it to components.json as well and rebuild Prism by running npm run build, so that it becomes available to the download build page. For new languages, please also add a few tests and an example in the examples/ folder.
  • Go to prism-themes if you want to add a new theme.

Thank you so much for contributing!!

Translations

  • 中文说明