From 7a23d52d8120fb046a1dfb1b54964e00c388303a Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 18 Feb 2021 20:56:30 +0100 Subject: [PATCH] Update PrismJS library (1.23.0) --- .gitignore | 2 +- assets/javascripts/vendor/prism.js | 1414 ++++++++++++++++++++++------ 2 files changed, 1118 insertions(+), 298 deletions(-) diff --git a/.gitignore b/.gitignore index 53bbb745..8f06d308 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ public/fonts public/docs/**/* docs/**/* !docs/*.md -vendor +/vendor diff --git a/assets/javascripts/vendor/prism.js b/assets/javascripts/vendor/prism.js index f12cee68..47be8b58 100644 --- a/assets/javascripts/vendor/prism.js +++ b/assets/javascripts/vendor/prism.js @@ -1,5 +1,7 @@ -/* PrismJS 1.20.0 +/* PrismJS 1.23.0 https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+cpp+coffeescript+crystal+d+dart+django+elixir+erlang+go+groovy+java+json+julia+kotlin+lua+markup-templating+matlab+nginx+nim+ocaml+perl+php+python+jsx+ruby+rust+scss+shell-session+sql+typescript+yaml */ +/// + var _self = (typeof window !== 'undefined') ? window // if in browser : ( @@ -10,10 +12,12 @@ var _self = (typeof window !== 'undefined') /** * Prism: Lightweight, robust, elegant syntax highlighting - * MIT license http://www.opensource.org/licenses/mit-license.php/ - * @author Lea Verou http://lea.verou.me + * + * @license MIT + * @author Lea Verou + * @namespace + * @public */ - var Prism = (function (_self){ // Private helper vars @@ -22,8 +26,39 @@ var uniqueId = 0; var _ = { + /** + * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the + * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load + * additional languages or plugins yourself. + * + * By setting this value to `true`, Prism will not automatically highlight all code elements on the page. + * + * You obviously have to change this value before the automatic highlighting started. To do this, you can add an + * empty Prism object into the global scope before loading the Prism script like this: + * + * ```js + * window.Prism = window.Prism || {}; + * Prism.manual = true; + * // add a new