push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
From c5af641cccf663dffb4a47d32e28404f609badce Mon Sep 17 00:00:00 2001
From: Tomo <tomodachi94@protonmail.com>
Date: Sat, 12 Oct 2024 03:39:12 +0000
Subject: [PATCH 1/2] chore(KaTeX): bump to 0.7.1
Many bugfixes. This KaTeX is still quite old,
but versions beyond this have backwards-incompatibilities
(starting in 0.8).
---
mdeditor/static/mdeditor/js/editormd.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mdeditor/static/mdeditor/js/editormd.js b/mdeditor/static/mdeditor/js/editormd.js
index be0005d..8aacb56 100644
--- a/mdeditor/static/mdeditor/js/editormd.js
+++ b/mdeditor/static/mdeditor/js/editormd.js
@@ -4179,8 +4179,8 @@
// 使用国外的CDN加载速度有时会很慢或者自定义URL
// You can custom KaTeX load url.
editormd.katexURL = {
- css : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.3.0/katex.min",
- js : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.3.0/katex.min"
+ css : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.7.1/katex.min",
+ js : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.7.1/katex.min"
};
editormd.kaTeXLoaded = false;
--
2.46.2
From 3d082a738262b057d33b9aa8c777d50113143952 Mon Sep 17 00:00:00 2001
From: Tomo <tomodachi94@protonmail.com>
Date: Mon, 7 Oct 2024 17:44:39 -0700
Subject: [PATCH 2/2] fix(KaTeX): Use jsdelivr instead of bootcdn
Bootcdn was compromised by a malicious actor:
https://sansec.io/research/polyfill-supply-chain-attack
KaTeX recommends using jsdelivr, so I used that:
https://katex.org/docs/browser
---
mdeditor/static/mdeditor/js/editormd.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mdeditor/static/mdeditor/js/editormd.js b/mdeditor/static/mdeditor/js/editormd.js
index 8aacb56..a31e817 100644
--- a/mdeditor/static/mdeditor/js/editormd.js
+++ b/mdeditor/static/mdeditor/js/editormd.js
@@ -4179,8 +4179,8 @@
// 使用国外的CDN加载速度有时会很慢或者自定义URL
// You can custom KaTeX load url.
editormd.katexURL = {
- css : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.7.1/katex.min",
- js : "//cdn.bootcdn.net/ajax/libs/KaTeX/0.7.1/katex.min"
+ css : "//cdn.jsdelivr.net/npm/katex@0.7.1/dist/katex.min.css",
+ js : "//cdn.jsdelivr.net/npm/katex@0.7.1/dist/katex.min.js"
};
editormd.kaTeXLoaded = false;
--
2.46.2

View File

@@ -0,0 +1,39 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
django,
}:
let
version = "0.1.20";
in
buildPythonPackage {
pname = "django-mdeditor";
inherit version;
format = "setuptools";
src = fetchFromGitHub {
owner = "pylixm";
repo = "django-mdeditor";
rev = "v${version}";
hash = "sha256-t57j1HhjNQtBwlbqe4mAHQ9WiNcIhMKYmrZkiqh+k5k=";
};
patches = [
./Bump-KaTeX-and-replace-bootcdn-with-jsdelivr.patch
];
propagatedBuildInputs = [ django ];
# no tests
doCheck = false;
pythonImportsCheck = [ "mdeditor" ];
meta = with lib; {
description = "Markdown Editor plugin application for django based on Editor.md";
homepage = "https://github.com/pylixm/django-mdeditor";
changelog = "https://github.com/pylixm/django-mdeditor/releases";
license = licenses.gpl3;
maintainers = with maintainers; [ augustebaum ];
};
}