Lightweight, robust, elegant syntax highlighting.
Go to file
Michael Schmidt 4ff555bea1
Added JSDoc (#1782)
2020-06-28 01:34:29 +02:00
.github/ISSUE_TEMPLATE Issue template improvements (#2069) 2019-09-26 16:46:43 +02:00
components Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
docs Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
examples Add support for the language Agda (#2430) 2020-06-24 14:30:38 +02:00
gulpfile.js Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
img Website: Added Coy bug to the known failures page. (#2170) 2020-02-18 22:17:05 +01:00
plugins Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
scripts Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
templates Added @mAAdhaTTah and @RunDevelopment to credits and footer 2019-10-05 13:53:01 +02:00
tests Added JSDoc (#1782) 2020-06-28 01:34:29 +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 .github folder to npm ignore (#2052) 2019-09-10 13:38:22 +02:00
.travis.yml Removed gulp `premerge` task (#2357) 2020-06-12 16:09:46 +02:00
CHANGELOG.md Changelog: Fixed v1.20.0 release date 2020-06-01 16:43:17 +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 Ignore tests directory in bower.json 2016-04-06 03:56:45 +02:00
components.js Added test to sort the language list (#2222) 2020-06-27 22:38:50 +02:00
components.json Added test to sort the language list (#2222) 2020-06-27 22:38:50 +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 Standardized dependency logic implementation (#1998) 2019-12-16 12:49:21 +01:00
examples.html Added scripts directory (#1781) 2019-03-11 00:32:45 +01:00
extending.html Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
faq.html Website: FAQ update (#1977) 2019-09-03 17:43:51 +02:00
favicon.png Optimize images (#1007) 2016-07-29 13:37:25 -04:00
index.html Website improvements (#2053) 2020-05-07 13:40:37 +02:00
known-failures.html Scheme: Improvements (#2263) 2020-04-07 20:32:39 +02:00
logo.svg Website: remove width and height on logo.svg, so it becomes scalable. Close #1005 2017-09-09 12:12:00 +02:00
package-lock.json Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
package.json Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
prism.js Added JSDoc (#1782) 2020-06-28 01:34:29 +02:00
style.css Website improvements (#2053) 2020-05-07 13:40:37 +02:00
test-suite.html Website improvements (#2053) 2020-05-07 13:40:37 +02:00
test.html Improved test page performance for Chromium (#2020) 2019-08-29 16:37:13 +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

  • 中文说明