Skip to content

Commit

Permalink
Updated highlight.js to 11.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Apr 29, 2023
1 parent d387397 commit 7bc395a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ hljs-loader is a small (3 KB) script that can be added to any webpage to automat
Add this anywhere to your HTML page:

```html
<script defer src="https://cdn.jsdelivr.net/gh/s9e/[email protected].32/loader.min.js"
<script defer src="https://cdn.jsdelivr.net/gh/s9e/[email protected].33/loader.min.js"
crossorigin="anonymous"
integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv"></script>
integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz"></script>
```


Expand All @@ -17,13 +17,13 @@ Add this anywhere to your HTML page:
No configuration is required but a number of options are available and can be set on the `script` element that loads this script.

```html
<script defer src="https://cdn.jsdelivr.net/gh/s9e/[email protected].32/loader.min.js"
<script defer src="https://cdn.jsdelivr.net/gh/s9e/[email protected].33/loader.min.js"
crossorigin="anonymous"
data-hljs-observe="body"
data-hljs-options='{"classPrefix":""}'
data-hljs-style="github"
data-hljs-url="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/"
integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv"></script>
data-hljs-url="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/"
integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz"></script>
```

<dl>
Expand Down
2 changes: 1 addition & 1 deletion ext/highlight.js
Submodule highlight.js updated 42 files
+2 −2 .github/workflows/release.yml
+50 −0 CHANGES.md
+18 −18 README.md
+10 −2 SUPPORTED_LANGUAGES.md
+25 −0 docs/api.rst
+1 −1 docs/conf.py
+46 −0 docs/mode-reference.rst
+2,041 −1,188 package-lock.json
+21 −19 package.json
+65 −30 src/highlight.js
+3 −1 src/languages/bash.js
+4 −1 src/languages/dart.js
+12 −1 src/languages/haskell.js
+1 −1 src/languages/http.js
+16 −1 src/languages/javascript.js
+1 −0 src/languages/lib/ecmascript.js
+656 −47 src/languages/lib/mathematica.js
+12 −3 src/languages/php.js
+1 −0 src/languages/protobuf.js
+1 −1 src/languages/python.js
+211 −80 src/languages/sqf.js
+1 −1 src/languages/sql.js
+3 −1 src/languages/typescript.js
+9 −7 src/lib/html_renderer.js
+15 −19 src/lib/token_tree.js
+31 −0 test/browser/highlight_block_callbacks.js
+4 −2 test/detect/sqf/default.txt
+19 −0 test/markup/haskell/char.expect.txt
+19 −0 test/markup/haskell/char.txt
+13 −0 test/markup/http/http3.expect.txt
+13 −0 test/markup/http/http3.txt
+10 −0 test/markup/javascript/inline-languages.expect.txt
+10 −0 test/markup/javascript/inline-languages.txt
+11 −1 test/markup/php/strings.expect.txt
+11 −1 test/markup/php/strings.txt
+4 −0 test/markup/shell/prompt-with-tilde.expect.txt
+0 −4 test/markup/shell/prompt-with-tilde.expected.txt
+10 −0 test/markup/typescript/inline-languages.expect.txt
+10 −0 test/markup/typescript/inline-languages.txt
+4 −1 tools/build_node.js
+6 −1 tools/lib/language.js
+2 −0 types/index.d.ts
4 changes: 2 additions & 2 deletions loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
function generateAliasMap()
{
const packedMap = '1c abnf accesslog actionscript,as ada angelscript,asc apache%conf applescript,osascript arcade arduino arm!asm asciidoc,adoc aspectj autohotkey,ahk autoit avrasm awk axapta,x++ basic bnf brainfuck,bf cal capnp!roto ceylon clean,dcl,icl clojure,clj,edn clojure-repl cmake coffee!script,cson,iced coq cos,cls crm!sh,pcmk cr!ystal csp d dart delphi,dfm,dpr,pas!cal django,jinja dns,bind,zone docker!file dos,bat,cmd dsconfig dts dust,dst ebnf elixir,ex!s elm erb erl!ang erlang-repl excel,xls!x fix flix fortran,f90,f95 fs!harp,f# gams,gms gauss,gss gcode,nc gherkin,feature glsl gml golo gradle graphql,gql groovy haml handlebars,hbs,htmlbars haskell,hs haxe,hx hsp http%s hy%lang inform7,i7 irpf90 isbl jboss-cli,wildfly-cli julia julia-repl,jldoctest kotlin,kt!s lasso%script,ls latex,tex ldif leaf lisp livecodeserver livescript,ls llvm lsl mathematica,mma,wl matlab maxima mel m!ercury,moo mips!asm mizar mojolicious monkey moon!script n1ql nestedtext,nt nginx%conf nim nix%os node-repl nsis ocaml,ml openscad,scad oxygene parser3 pf pgsql,postgres!ql pony powershell,ps!1,pwsh processing,pde profile prolog properties protobuf puppet,pp purebasic,pb!i q,k!db qml,qt re!asonml rib roboconf,graph,instances routeros,mikrotik rsl ruleslanguage sas scala scheme,scm sci!lab smali smalltalk,st sml,ml sqf sql stan%funcs stata,ado,do step!21,p21,stp styl!us subunit taggerscript tap tcl,tk thrift tp twig,craftcms vala vbs!cript vbscript-html v!erilog,sv!h vhdl vim wasm wren x86asm xl,tao xq!uery,xpath zep!hir';
const packedMap = '1c abnf accesslog actionscript,as ada angelscript,asc apache%conf applescript,osascript arcade arduino arm!asm asciidoc,adoc aspectj autohotkey,ahk autoit avrasm awk axapta,x++ basic bnf brainfuck,bf cal capnp!roto ceylon clean,dcl,icl clojure,clj,edn clojure-repl cmake coffee!script,cson,iced coq cos,cls crm!sh,pcmk cr!ystal csp d dart delphi,dfm,dpr,pas!cal django,jinja dns,bind,zone docker!file dos,bat,cmd dsconfig dts dust,dst ebnf elixir,ex!s elm erb erl!ang erlang-repl excel,xls!x fix flix fortran,f90,f95 fs!harp,f# gams,gms gauss,gss gcode,nc gherkin,feature glsl gml golo gradle graphql,gql groovy haml handlebars,hbs,htmlbars haskell,hs haxe,hx hsp http%s hy%lang inform7,i7 irpf90 isbl jboss-cli,wildfly-cli julia julia-repl,jldoctest kotlin,kt!s lasso%script,ls latex,tex ldif leaf lisp livecodeserver livescript,ls llvm lsl mathematica,mma,wl matlab maxima mel m!ercury,moo mips!asm mizar mojolicious monkey moon!script n1ql nestedtext,nt nginx%conf nim nix%os node-repl nsis ocaml,ml openscad,scad oxygene parser3 pf pgsql,postgres!ql pony powershell,ps!1,pwsh processing,pde profile prolog properties proto!buf puppet,pp purebasic,pb!i q,k!db qml,qt re!asonml rib roboconf,graph,instances routeros,mikrotik rsl ruleslanguage sas scala scheme,scm sci!lab smali smalltalk,st sml,ml sqf sql stan%funcs stata,ado,do step!21,p21,stp styl!us subunit taggerscript tap tcl,tk thrift tp twig,craftcms vala vbs!cript vbscript-html v!erilog,sv!h vhdl vim wasm wren x86asm xl,tao xq!uery,xpath zep!hir';

map = {};
for (let str of packedMap.replace(/(\w+)(?:%|!(\w+))/g, '$1$2,$1').split(' '))
Expand Down Expand Up @@ -214,7 +214,7 @@
options = config['hljsOptions'],
skip = {'':1},
style = config['hljsStyle'] || 'default',
url = config['hljsUrl'] || 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/';
url = config['hljsUrl'] || 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/';

// Prepare to highlight all code blocks as soon as possible
if (document.readyState === 'complete')
Expand Down
4 changes: 2 additions & 2 deletions loader.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7bc395a

Please sign in to comment.