aboutsummaryrefslogtreecommitdiffstats
path: root/package-lock.json
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-09-13 17:33:37 +0100
committerGitHub <noreply@github.com>2022-09-14 00:33:37 +0800
commit88c2e2436001c868c2583950b5f9eb0516424b7d (patch)
tree8918c8f6168373d7c74137349b22c108debd3873 /package-lock.json
parenteaa561145ac276b9ba8b19e1abd86e97f1a05225 (diff)
downloadgitea-88c2e2436001c868c2583950b5f9eb0516424b7d.tar.gz
gitea-88c2e2436001c868c2583950b5f9eb0516424b7d.zip
Add KaTeX rendering to Markdown. (#20571)
This PR adds mathematical rendering with KaTeX. The first step is to add a Goldmark extension that detects the latex (and tex) mathematics delimiters. The second step to make this extension only run if math support is enabled. The second step is to then add KaTeX CSS and JS to the head which will load after the dom is rendered. Fix #3445 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'package-lock.json')
-rw-r--r--package-lock.json39
1 files changed, 39 insertions, 0 deletions
diff --git a/package-lock.json b/package-lock.json
index b3597a624e..9e613422d0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -20,6 +20,7 @@
"font-awesome": "4.7.0",
"jquery": "3.6.1",
"jquery.are-you-sure": "1.9.0",
+ "katex": "0.16.2",
"less": "4.1.3",
"less-loader": "11.0.0",
"license-checker-webpack-plugin": "0.2.1",
@@ -7750,6 +7751,29 @@
"resolved": "https://registry.npmjs.org/just-extend/-/just-extend-5.1.1.tgz",
"integrity": "sha512-b+z6yF1d4EOyDgylzQo5IminlUmzSeqR1hs/bzjBNjuGras4FXq/6TrzjxfN0j+TmI0ltJzTNlqXUMCniciwKQ=="
},
+ "node_modules/katex": {
+ "version": "0.16.2",
+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.2.tgz",
+ "integrity": "sha512-70DJdQAyh9EMsthw3AaQlDyFf54X7nWEUIa5W+rq8XOpEk//w5Th7/8SqFqpvi/KZ2t6MHUj4f9wLmztBmAYQA==",
+ "funding": [
+ "https://opencollective.com/katex",
+ "https://github.com/sponsors/katex"
+ ],
+ "dependencies": {
+ "commander": "^8.0.0"
+ },
+ "bin": {
+ "katex": "cli.js"
+ }
+ },
+ "node_modules/katex/node_modules/commander": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
+ "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
"node_modules/khroma": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/khroma/-/khroma-2.0.0.tgz",
@@ -17717,6 +17741,21 @@
"resolved": "https://registry.npmjs.org/just-extend/-/just-extend-5.1.1.tgz",
"integrity": "sha512-b+z6yF1d4EOyDgylzQo5IminlUmzSeqR1hs/bzjBNjuGras4FXq/6TrzjxfN0j+TmI0ltJzTNlqXUMCniciwKQ=="
},
+ "katex": {
+ "version": "0.16.2",
+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.2.tgz",
+ "integrity": "sha512-70DJdQAyh9EMsthw3AaQlDyFf54X7nWEUIa5W+rq8XOpEk//w5Th7/8SqFqpvi/KZ2t6MHUj4f9wLmztBmAYQA==",
+ "requires": {
+ "commander": "^8.0.0"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
+ "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="
+ }
+ }
+ },
"khroma": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/khroma/-/khroma-2.0.0.tgz",