mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-21 17:30:58 +08:00
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>
16 lines
422 B
JavaScript
Vendored
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`;
|
|
}
|