Skip to content

Commit

Permalink
[TASK] Update Prism to version 1.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
brotkrueml committed Mar 27, 2020
1 parent 37a275d commit 1ba8849
Show file tree
Hide file tree
Showing 92 changed files with 434 additions and 922 deletions.
10 changes: 5 additions & 5 deletions Build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"name": "codehighlight",
"license": "GPL-2.0+",
"dependencies": {
"prismjs": "^1.17.1"
"prismjs": "^1.19.0"
},
"devDependencies": {
"del": "^5.1.0",
"gulp": "^4.0.2",
"gulp-clean-css": "^4.2.0",
"gulp-clean-css": "^4.3.0",
"gulp-concat": "^2.6.1",
"gulp-nunjucks": "^5.0.0",
"gulp-nunjucks": "^5.0.1",
"gulp-rename": "^1.4.0",
"gulp-uglify": "^3.0.2",
"patch-package": "^6.2.0",
"postinstall-postinstall": "^2.0.0"
"patch-package": "^6.2.1",
"postinstall-postinstall": "^2.1.0"
},
"scripts": {
"postinstall": "patch-package",
Expand Down
30 changes: 0 additions & 30 deletions Build/patches/prismjs+1.17.1.patch

This file was deleted.

27 changes: 27 additions & 0 deletions Build/patches/prismjs+1.19.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/node_modules/prismjs/plugins/autoloader/prism-autoloader.js b/node_modules/prismjs/plugins/autoloader/prism-autoloader.js
index 964e767..5043efc 100644
--- a/node_modules/prismjs/plugins/autoloader/prism-autoloader.js
+++ b/node_modules/prismjs/plugins/autoloader/prism-autoloader.js
@@ -192,21 +192,7 @@

var script = Prism.util.currentScript();
if (script) {
- var autoloaderFile = /\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i;
- var prismFile = /[\w-]+\.(?:min\.)js$/i;
- if (script.hasAttribute('data-autoloader-path')) {
- // data-autoloader-path is set, so just use it
- languages_path = script.getAttribute('data-autoloader-path').trim().replace(/\/?$/, '/');
- } else {
- var src = script.src;
- if (autoloaderFile.test(src)) {
- // the script is the original autoloader script in the usual Prism project structure
- languages_path = src.replace(autoloaderFile, 'components/');
- } else if (prismFile.test(src)) {
- // the script is part of a bundle like a custom prism.js from the download page
- languages_path = src.replace(prismFile, 'components/');
- }
- }
+ var languages_path = '/typo3conf/ext/codehighlight/Resources/Public/Prism/components/';
}

var config = Prism.plugins.autoloader = {

0 comments on commit 1ba8849

Please sign in to comment.