From 1a635f6bf0acc6d4c401b61a2ae848ca43357c56 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 27 Nov 2020 12:18:24 +0000 Subject: [PATCH] Include KaTeX CSS as a dependency This changes the KaTeX CSS inclusion to function just like the other bits of the CSS that we import from dependencies. --- package.json | 1 + src/vector/index.ts | 1 + webpack.config.js | 3 --- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 05c0c0434..214c7c38d 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "gfm.css": "^1.1.2", "highlight.js": "^10.1.2", "jsrsasign": "^9.1.5", + "katex": "^0.12.0", "matrix-js-sdk": "9.3.0-rc.1", "matrix-react-sdk": "3.10.0-rc.1", "matrix-widget-api": "^0.1.0-beta.10", diff --git a/src/vector/index.ts b/src/vector/index.ts index a88c1d068..a3a7bbb90 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -23,6 +23,7 @@ limitations under the License. // in webpack.config.js require('gfm.css/gfm.css'); require('highlight.js/styles/github.css'); +require('katex/dist/katex.css') // These are things that can run before the skin loads - be careful not to reference the react-sdk though. import {parseQsFromFragment} from "./url_utils"; diff --git a/webpack.config.js b/webpack.config.js index 326e48e2e..2b540f7bb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -41,9 +41,6 @@ module.exports = (env, argv) => { "jitsi": "./src/vector/jitsi/index.ts", "usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.js", - // CSS for LaTeX maths outout - "katex": "./node_modules/matrix-react-sdk/node_modules/katex/dist/katex.min.css", - // CSS themes "theme-legacy": "./node_modules/matrix-react-sdk/res/themes/legacy-light/css/legacy-light.scss", "theme-legacy-dark": "./node_modules/matrix-react-sdk/res/themes/legacy-dark/css/legacy-dark.scss",