Refactor maths config options to nested structure
This commit is contained in:
parent
3c1169c7a2
commit
1d70045065
2 changed files with 6 additions and 6 deletions
|
@ -92,8 +92,8 @@ export function htmlSerializeIfNeeded(model: EditorModel, {forceHTML = false} =
|
|||
patternNames.forEach(function(patternName) {
|
||||
patternTypes.forEach(function(patternType) {
|
||||
// get the regex replace pattern from config or use the default
|
||||
const pattern = (SdkConfig.get()["latex_maths_delims"] ||
|
||||
{})[patternType + "_pattern_" + patternName] ||
|
||||
const pattern = (((SdkConfig.get()["latex_maths_delims"] ||
|
||||
{})[patternType] || {})["pattern"] || {})[patternName] ||
|
||||
patternDefaults[patternName][patternType];
|
||||
|
||||
md = md.replace(RegExp(pattern, "gms"), function(m, p1, p2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue