Lightweight, robust, elegant syntax highlighting.
Go to file
Juan Caicedo 46468f84f4 Add support for Lisp (#1297)
* add emacs

* rename to elisp

* add elisp to components

* add comment test

* add heading test

* WIP string test

* update string tests

* test symbols in strings

* test arguments

* test quoted symbol

* lisp-property test

* splice test

* add keyword test

* test for declare

* test interactive

* boolean test

* test numbers

* test defvar

* fix greedy defun regex

* test defun

* test lambda

* test car

* test punctuation

* use var instead of const

* remove arrow functions

* flatten language structure

* remove unnecessary escaping

* add lisp and emacs

* add lisp

* fix template strings

* minify lisp

* add example elisp file

* simplify number

* don't mark other def as keywords

* dont mark other def as keyword in defun

* make lambda a keyword only at the beginning

* restore single quotes in components

* double quote in elisp

* minify elisp

* quote keys in components

* rename punctuation test

* add semicolons elisp

* undo prettier changes to components.js

* add lisp to components.json

* rename elisp to lisp

* fix components.json

* add minified lisp file

* rename example lisp file

* move lisp to first position

* explain null initialized properties in lisp file

* remove trailing commas

* put lisp first in example file

* add ifee for lisp file

* update lisp min file

* update show language assets

* add components index min file

* add emacs-lisp alias

* change title of lisp example file

* undo theme change

* combine regex for parens

* remove min index

* remove unneeded example html

* remove doubled string test

* capitalize lisp in components

* change string theme to match master

* build assets after adding lisp
2018-04-05 19:24:22 +02:00
components Add support for Lisp (#1297) 2018-04-05 19:24:22 +02:00
examples Add support for Lisp (#1297) 2018-04-05 19:24:22 +02:00
img Update "Used by" section (#1330) 2018-03-07 21:31:53 +01:00
plugins File Highlight: Add option to provide a download button, when used with the Toolbar plugin. Fix #1030 2018-03-26 22:25:03 +02:00
templates Changed the text in the header. Way overdue, as Prism’s popularity has way surpassed that of Dabblet 2016-02-13 15:26:22 -05:00
tests Add support for Lisp (#1297) 2018-04-05 19:24:22 +02:00
themes Reach AA contrast ratio level (#1296) 2018-03-26 22:47:44 +02:00
vendor Add a way to download all grammars as a Zip directly from the Autoloader plugin page 2016-06-18 15:45:25 +02:00
.editorconfig Added basic .editorconfig 2015-09-27 10:04:21 +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
.npmignore Update .npmignore Close #1274 2018-03-20 09:00:58 +01:00
.travis.yml Build all branches (including gh-pages) on Travis CI. Closes #1341 2018-03-11 09:26:33 +01:00
CHANGELOG.md Release 1.13.0 2018-03-21 08:26:28 +01: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 Update README.md 2015-08-18 23:54:14 +02:00
bower.json Ignore tests directory in bower.json 2016-04-06 03:56:45 +02:00
code.js Website: Check stored theme by default + link both theme selectors together. Close #1038 2018-03-20 08:27:50 +01:00
components.js Add support for Lisp (#1297) 2018-04-05 19:24:22 +02:00
components.json Add support for Lisp (#1297) 2018-04-05 19:24:22 +02:00
composer.json Add Composer support (#648) 2017-09-09 11:15:47 +02:00
download.html Merge pull request #561 from Golmote/prism-check-all 2015-09-03 22:54:45 +02:00
download.js Website: Check stored theme by default + link both theme selectors together. Close #1038 2018-03-20 08:27:50 +01:00
examples.html Added some language aliases. 2015-09-03 23:39:16 +02:00
examples.js Website: Auto-generate example header with component title, list of aliases and dependencies. 2018-03-11 11:11:34 +01:00
extending.html Docs: Add note on `async` parameter to clarify the requirement of using a single bundled file. Closes #1249 2018-03-04 16:24:32 +01:00
faq.html Website: Add link to Keep Markup plugin in FAQ 2018-03-30 08:55:13 +02:00
favicon.png Optimize images (#1007) 2016-07-29 13:37:25 -04:00
gulpfile.js Gulp: There is probably no need to minify `components/index.js` 2018-04-05 19:08:57 +02:00
index.html Website: Remove non-existent anchor to failures. Reword on homepage to make is less misleading. 2018-03-26 21:25:52 +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.json Release 1.13.0 2018-03-21 08:26:28 +01:00
prefixfree.min.js Styling and docs changes 2012-07-31 18:14:55 +12:00
prism.js File Highlight: Add option to provide a download button, when used with the Toolbar plugin. Fix #1030 2018-03-26 22:25:03 +02:00
style.css Website: Improve appearance of theme selector 2018-03-19 08:46:46 +01:00
test-suite.html Added TestCase.runTestsWithHooks + add missing tests. Updated documentation for test suite. 2016-07-11 20:37:47 +02:00
test.html Improve test drive page usability. Fix #591 2015-06-12 21:43:31 +02:00
utopia.js Commit updated line changes 2015-08-18 08:22:40 +02:00

README.md

Prism

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

You can learn more on http://prismjs.com/.

Why another syntax highlighter?: http://lea.verou.me/2012/07/introducing-prism-an-awesome-new-syntax-highlighter/#more-1841

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. The minified files are also generated automatically.
  • The build system uses gulp to minify the files and build prism.js. Having gulp installed, you just need to run the command gulp.
  • 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, theme or plugin, you need to add it to components.js as well, so that it becomes available to the download build page.

Thank you so much for contributing!!