diff --git a/.gitignore b/.gitignore index 527c2975..a88c612e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ static/style.css static/torrents/* !static/torrents/*.torrent !static/torrents/README.md + +tmp diff --git a/client/style.styl b/client/style.styl index 432070fe..87caa6d9 100644 --- a/client/style.styl +++ b/client/style.styl @@ -805,7 +805,7 @@ body.is-seed .show-leech .error-list.visible display: block -@import '../node_modules/highlight.js/styles/zenburn.css' +@import '../node_modules/highlight.js/styles/base16/zenburn.css' #carbonads { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, diff --git a/package-lock.json b/package-lock.json index 08189b3b..919d88fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "express": "4.18.1", "express-rate-limit": "5.5.1", "gitter-irc-bot": "1.6.0", - "highlight.js": "10.7.3", + "highlight.js": "11.6.0", "moment": "2.29.4", "morgan": "1.10.0", "multer": "1.4.4", @@ -3937,11 +3937,11 @@ } }, "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz", + "integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==", "engines": { - "node": "*" + "node": ">=12.0.0" } }, "node_modules/hmac-drbg": { @@ -12257,9 +12257,9 @@ } }, "highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==" + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz", + "integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==" }, "hmac-drbg": { "version": "1.0.1", diff --git a/package.json b/package.json index f83924d2..89bb8169 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "express": "4.18.1", "express-rate-limit": "5.5.1", "gitter-irc-bot": "1.6.0", - "highlight.js": "10.7.3", + "highlight.js": "11.6.0", "moment": "2.29.4", "morgan": "1.10.0", "multer": "1.4.4", diff --git a/server/index.js b/server/index.js index 28cf6e74..181562f0 100644 --- a/server/index.js +++ b/server/index.js @@ -22,7 +22,7 @@ const remark = new Remarkable({ html: true, highlight: function (code, lang) { const h = lang - ? highlight.highlight(lang, code) + ? highlight.highlight(code, { language: lang }) : highlight.highlightAuto(code) return '
' + h.value + '
' }