discourse/plugins/discourse-math/assets/javascripts/lib/math-bundle-paths.js
Sam d31ca17c57
FEATURE: update mathjax to version 4.1 (#36814)
This upgrades to Mathjax 4.1 and latest katex
Implement rich text composer support for math
Adds support for /( )/ and /[ /] which was missing and very common now 
Removes math javascript from our repo

---------

Co-authored-by: Mark McClure <mcmcclur@unca.edu>
2026-01-09 08:24:31 +11:00

16 lines
422 B
JavaScript
Vendored

import { helperContext } from "discourse/lib/helpers";
const FALLBACK_PUBLIC_BASE = "/plugins/discourse-math";
function getPublicBasePath() {
const context = helperContext();
return context?.site?.discourse_math_bundle_url || FALLBACK_PUBLIC_BASE;
}
export function getMathJaxBasePath() {
return `${getPublicBasePath()}/mathjax`;
}
export function getKaTeXBasePath() {
return `${getPublicBasePath()}/katex`;
}