math off by default, enable with latex_maths flag
This commit is contained in:
parent
e78734bbf6
commit
428a6b94ff
2 changed files with 5 additions and 2 deletions
|
@ -19,6 +19,7 @@ import Markdown from '../Markdown';
|
|||
import {makeGenericPermalink} from "../utils/permalinks/Permalinks";
|
||||
import EditorModel from "./model";
|
||||
import { AllHtmlEntities } from 'html-entities';
|
||||
import SdkConfig from '../SdkConfig';
|
||||
|
||||
export function mdSerialize(model: EditorModel) {
|
||||
return model.parts.reduce((html, part) => {
|
||||
|
@ -41,7 +42,7 @@ export function mdSerialize(model: EditorModel) {
|
|||
export function htmlSerializeIfNeeded(model: EditorModel, {forceHTML = false} = {}) {
|
||||
var md = mdSerialize(model);
|
||||
|
||||
if (true) { // TODO: add katex setting
|
||||
if (SdkConfig.get()['latex_maths']) {
|
||||
const mathDelimiters = [ // TODO: make customizable
|
||||
{ left: "\\$\\$\\$", right: "\\$\\$\\$", display: true },
|
||||
{ left: "\\$\\$", right: "\\$\\$", display: false }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue