prism/docs/index.html

107 lines
6.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Home - Documentation</title>
<meta property="og:title" content="Prism generated API documentation"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="/logo.svg"/>
<meta property="og:site_name" content="Prism"/>
<meta property="og:url" content="https://prismjs.com"/>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/favicon.png"/>
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<input type="text" id="nav-search" placeholder="Search" />
<h2><a href="index.html">Home</a></h2><h2><a href="https://prismjs.com" class="menu-item" id="website_link" >PrismJS</a></h2><h2><a href="https://github.com/PrismJS/prism" target="_blank" class="menu-item" id="github_link" >GitHub</a></h2><h3>Classes</h3><ul><li><a href="Token.html">Token</a></li></ul><h3>Namespaces</h3><ul><li><a href="Prism.html">Prism</a><ul class='members'><li data-type='member'><a href="Prism.html#.manual">manual</a></li></ul><ul class='methods'><li data-type='method'><a href="Prism.html#.highlight">highlight</a></li><li data-type='method'><a href="Prism.html#.highlightAll">highlightAll</a></li><li data-type='method'><a href="Prism.html#.highlightAllUnder">highlightAllUnder</a></li><li data-type='method'><a href="Prism.html#.highlightElement">highlightElement</a></li><li data-type='method'><a href="Prism.html#.tokenize">tokenize</a></li></ul></li><li><a href="Prism.hooks.html">hooks</a><ul class='methods'><li data-type='method'><a href="Prism.hooks.html#.add">add</a></li><li data-type='method'><a href="Prism.hooks.html#.run">run</a></li></ul></li><li><a href="Prism.languages.html">languages</a><ul class='methods'><li data-type='method'><a href="Prism.languages.html#.extend">extend</a></li><li data-type='method'><a href="Prism.languages.html#.insertBefore">insertBefore</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#Grammar">Grammar</a></li><li><a href="global.html#GrammarToken">GrammarToken</a></li><li><a href="global.html#HighlightCallback">HighlightCallback</a></li><li><a href="global.html#HookCallback">HookCallback</a></li><li><a href="global.html#TokenStream">TokenStream</a></li></ul>
</nav>
<div id="main">
<section class="readme usertext">
<article><h1><a href="https://prismjs.com/">Prism</a></h1>
<p><a href="https://travis-ci.org/PrismJS/prism"><img src="https://travis-ci.org/PrismJS/prism.svg?branch=master" alt="Build Status"></a>
<a href="https://www.npmjs.com/package/prismjs"><img src="https://img.shields.io/npm/dw/prismjs.svg" alt="npm"></a></p>
<p>Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from <a href="https://dabblet.com/">Dabblet</a>.</p>
<p>You can learn more on <a href="https://prismjs.com/">prismjs.com</a>.</p>
<p><a href="https://lea.verou.me/2012/07/introducing-prism-an-awesome-new-syntax-highlighter/#more-1841">Why another syntax highlighter?</a></p>
<p><a href="https://github.com/PrismJS/prism-themes">More themes for Prism!</a></p>
<h2>Contribute to Prism!</h2>
<p>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:</p>
<ul>
<li>Read the <a href="https://prismjs.com/extending.html">documentation</a>. Prism was designed to be extensible.</li>
<li>Do not edit <code>prism.js</code>, its just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in the <code>components/</code> folder. <code>prism.js</code> and all minified files are also generated automatically by our build system.</li>
<li>The build system uses <a href="https://github.com/gulpjs/gulp">gulp</a> to minify the files and build <code>prism.js</code>. With all of Prism's dependencies installed, you just need to run the command <code>npm run build</code>.</li>
<li>Please follow the code conventions used in the files already. For example, I use <a href="http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/">tabs for indentation and spaces for alignment</a>. 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.</li>
<li>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.</li>
<li>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.</li>
<li>If you contribute a new language definition, you will be responsible for handling bug reports about that language definition.</li>
<li>If you <a href="https://prismjs.com/extending.html#creating-a-new-language-definition">add a new language definition</a> or plugin, you need to add it to <code>components.json</code> as well and rebuild Prism by running <code>npm run build</code>, so that it becomes available to the download build page. For new languages, please also add a few <a href="https://prismjs.com/test-suite.html">tests</a> and an example in the <code>examples/</code> folder.</li>
<li>Go to <a href="https://github.com/PrismJS/prism-themes">prism-themes</a> if you want to add a new theme.</li>
</ul>
<p>Thank you so much for contributing!!</p>
<h2>Translations</h2>
<ul>
<li><a href="https://www.awesomes.cn/repo/PrismJS/prism"><img src="http://awesomes.oss-cn-beijing.aliyuncs.com/readme.png" alt="中文说明"></a></li>
</ul></article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/search.js" defer></script>
<link type="text/css" rel="stylesheet" href="styles/overwrites.css">
</body>
</html>