Lightweight, robust, elegant syntax highlighting.
Go to file
mAAdhaTTah 88a17b4ff5
1.23.0
2020-12-31 13:46:45 -05:00
.github Test page: Added "Share" option (#2575) 2020-12-22 17:27:14 +01:00
assets thousands -> millions 2020-12-03 11:09:29 -05:00
components PHP: Fixed exponential backtracking (#2684) 2020-12-31 14:10:09 +01:00
docs Fixed build 2020-12-15 21:48:39 +01:00
examples Added support for DataWeave language (#2659) 2020-11-28 00:00:35 +01:00
gulpfile.js Treeview: Fixed icons on dark themes (#2631) 2020-12-22 10:50:39 +01:00
plugins Line Highlight: Fixed print background color (#2668) 2020-12-28 19:25:05 +01:00
tests C-like: Made all comments greedy (#2680) 2020-12-30 17:43:57 +01: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 Treeview: Fixed icons on dark themes (#2631) 2020-12-22 10:50:39 +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 alternative link for Chinese translation 2020-12-15 21:46:07 +01:00
bower.json Treeview: Fixed icons on dark themes (#2631) 2020-12-22 10:50:39 +01:00
components.js Added support for DataWeave language (#2659) 2020-11-28 00:00:35 +01:00
components.json Added support for DataWeave language (#2659) 2020-11-28 00:00:35 +01:00
composer.json Name in composer.json set to lowercase (#1824) 2019-03-24 12:42:17 -04:00
dangerfile.js Fixed Danger CI for forks (#2638) 2020-12-22 10:17:05 +01: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: Updated and improved guide on "Extending Prism" page (#2586) 2020-11-04 11:44:43 +01:00
faq.html Website: New assets directory for all web-only files (#2180) 2020-06-28 01:58:55 +02:00
index.html Website: Added and updated documentation (#2654) 2020-11-28 23:07:22 +01: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.23.0 2020-12-31 13:46:45 -05:00
package.json 1.23.0 2020-12-31 13:46:45 -05:00
prism.js C-like: Made all comments greedy (#2680) 2020-12-30 17:43:57 +01:00
test-suite.html Tests: Added an option to accept the actual token stream (#2515) 2020-08-17 16:22:21 +02:00
test.html Test page: Don't trigger ad-blockers with class (#2677) 2020-12-22 19:53:18 +01: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!!

Translations