Lightweight, robust, elegant syntax highlighting.
Go to file
Michael Schmidt de79636a8a
Website: Moved remaining vendor files into `vendor` folder (#2829)
2021-05-01 14:57:39 +02:00
.github ESLint: Fail CI if there are warnings (#2847) 2021-04-17 22:21:15 +02:00
assets Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00
components ESLint: Added spacing rules (#2862) 2021-05-01 14:53:38 +02:00
docs ESLint: Added spacing rules (#2862) 2021-05-01 14:53:38 +02:00
examples Added support for Coq (#2803) 2021-03-25 12:42:58 +01:00
gulpfile.js ESLint: Added no-use-before-define rule (#2866) 2021-04-18 16:14:33 +02:00
plugins Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00
tests ESLint: Added spacing rules (#2862) 2021-05-01 14:53:38 +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
.eslintrc.js Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02: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 ESLint with minimal config (#2831) 2021-03-26 13:16:16 +01:00
CHANGELOG.md Changelog v1.23.0 (#2681) 2020-12-31 13:40:08 -05: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 Readme: Added Node and npm version requirements (#2790) 2021-03-21 17:21:15 +01:00
bower.json Treeview: Fixed icons on dark themes (#2631) 2020-12-22 10:50:39 +01:00
components.js Added support for Coq (#2803) 2021-03-25 12:42:58 +01:00
components.json Added support for Coq (#2803) 2021-03-25 12:42:58 +01:00
composer.json Name in composer.json set to lowercase (#1824) 2019-03-24 12:42:17 -04:00
dangerfile.js ESLint: Added semi rule (#2836) 2021-04-17 22:30:39 +02:00
dependencies.js ESLint: Added JSDoc plugin (#2869) 2021-05-01 14:40:00 +02:00
download.html Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00
examples.html Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00
extending.html Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00
faq.html Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00
index.html Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00
known-failures.html Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00
package-lock.json ESLint: Added JSDoc plugin (#2869) 2021-05-01 14:40:00 +02:00
package.json ESLint: Added JSDoc plugin (#2869) 2021-05-01 14:40:00 +02:00
prism.js ESLint: Added spacing rules (#2862) 2021-05-01 14:53:38 +02:00
test-suite.html Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00
test.html Website: Moved remaining vendor files into `vendor` folder (#2829) 2021-05-01 14:57:39 +02:00

README.md

Prism

Build Status npm

Prism is a lightweight, robust, and 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, consider 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 a few huge PRs. If a PR includes changes that I want to merge and also changes that I don't, handling it becomes difficult.
  • My time is very limited these days, so it might take a long time to review bigger PRs (small 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!!

Software requirements

Prism will run on almost any browser and Node.js version but you need the following software to contribute:

  • Node.js >= 10.x
  • npm >= 6.x

Translations