Skip to content

Commit

Permalink
tune highlightjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwin Dondorp committed Aug 11, 2024
1 parent a98e1da commit 7e26fb1
Show file tree
Hide file tree
Showing 165 changed files with 318 additions and 41,914 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,3 +569,4 @@ SaltGUI includes these libraries (with possible modifications):
* [sorttable](https://www.kryogenix.org/code/browser/sorttable/)
* [search-highlight](https://www.the-art-of-web.com/javascript/search-highlight/)
* [jsonpath](https://www.w3resource.com/JSON/JSONPath-with-JavaScript.php)
* [highlight](https://www.highlightjs.org/)
27 changes: 27 additions & 0 deletions saltgui/static/highlight-update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# part of SaltGUI
# to be run by maintainers to update the "highlight" package

set -x

[ -f /tmp/highlight.zip ] ||
wget -O /tmp/highlight.zip --header='Content-Type: application/json' --post-data='{"api":2,"languages":["json","yaml"]}' https://highlightjs.org/api/download

# remove previous edition
git rm -r -f highlight
# just in case is was deleted or not yet there
mkdir --parent highlight
# unzip the downloaded file
(cd highlight && unzip -q /tmp/highlight.zip)
# add it to git
git add highlight

# cleanup
rm /tmp/highlight.zip

# show the result (summary)
git status
git diff --cached highlight/es/core.js

# End
168 changes: 14 additions & 154 deletions saltgui/static/highlight/DIGESTS.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions saltgui/static/highlight/es/core.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
Highlight.js v11.9.0 (git: b7ec4bfafc)
(c) 2006-2024 undefined and other contributors
Highlight.js v11.10.0 (git: 366a8bd012)
(c) 2006-2024 Josh Goebel <[email protected]> and other contributors
License: BSD-3-Clause
*/
/* eslint-disable no-multi-assign */
Expand Down Expand Up @@ -1555,7 +1555,7 @@ function expandOrCloneMode(mode) {
return mode;
}

var version = "11.9.0";
var version = "11.10.0";

class HTMLInjectionError extends Error {
constructor(reason, html) {
Expand Down
6 changes: 3 additions & 3 deletions saltgui/static/highlight/es/core.min.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
Highlight.js v11.9.0 (git: b7ec4bfafc)
(c) 2006-2024 undefined and other contributors
Highlight.js v11.10.0 (git: 366a8bd012)
(c) 2006-2024 Josh Goebel <[email protected]> and other contributors
License: BSD-3-Clause
*/
function e(t){return t instanceof Map?t.clear=t.delete=t.set=()=>{
Expand Down Expand Up @@ -301,7 +301,7 @@ e["before:highlightBlock"](Object.assign({block:t.el},t))
}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{
e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),r.push(e)},
removePlugin:e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}),n.debugMode=()=>{
o=!1},n.safeMode=()=>{o=!0},n.versionString="11.9.0",n.regex={concat:h,
o=!1},n.safeMode=()=>{o=!0},n.versionString="11.10.0",n.regex={concat:h,
lookahead:g,either:f,optional:d,anyNumberOfTimes:u}
;for(const t in A)"object"==typeof A[t]&&e(A[t]);return Object.assign(n,A),n
},ne=te({});ne.newInstance=()=>te({});export{ne as default};
6 changes: 3 additions & 3 deletions saltgui/static/highlight/es/highlight.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
Highlight.js v11.9.0 (git: b7ec4bfafc)
(c) 2006-2024 undefined and other contributors
Highlight.js v11.10.0 (git: 366a8bd012)
(c) 2006-2024 Josh Goebel <[email protected]> and other contributors
License: BSD-3-Clause
*/
/* eslint-disable no-multi-assign */
Expand Down Expand Up @@ -1555,7 +1555,7 @@ function expandOrCloneMode(mode) {
return mode;
}

var version = "11.9.0";
var version = "11.10.0";

class HTMLInjectionError extends Error {
constructor(reason, html) {
Expand Down
6 changes: 3 additions & 3 deletions saltgui/static/highlight/es/highlight.min.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
Highlight.js v11.9.0 (git: b7ec4bfafc)
(c) 2006-2024 undefined and other contributors
Highlight.js v11.10.0 (git: 366a8bd012)
(c) 2006-2024 Josh Goebel <[email protected]> and other contributors
License: BSD-3-Clause
*/
function e(t){return t instanceof Map?t.clear=t.delete=t.set=()=>{
Expand Down Expand Up @@ -301,7 +301,7 @@ e["before:highlightBlock"](Object.assign({block:t.el},t))
}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{
e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),r.push(e)},
removePlugin:e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}),n.debugMode=()=>{
o=!1},n.safeMode=()=>{o=!0},n.versionString="11.9.0",n.regex={concat:h,
o=!1},n.safeMode=()=>{o=!0},n.versionString="11.10.0",n.regex={concat:h,
lookahead:g,either:f,optional:d,anyNumberOfTimes:u}
;for(const t in A)"object"==typeof A[t]&&e(A[t]);return Object.assign(n,A),n
},ne=te({});ne.newInstance=()=>te({});export{ne as default};
Loading

0 comments on commit 7e26fb1

Please sign in to comment.