Comply with noImplicitAny (#9940)
* Stash noImplicitAny work * Stash * Fix imports * Iterate * Fix tests * Delint * Fix tests
This commit is contained in:
parent
ac7f69216e
commit
61a63e47f4
359 changed files with 1621 additions and 1353 deletions
|
@ -77,8 +77,8 @@ export function htmlSerializeFromMdIfNeeded(md: string, { forceHTML = false } =
|
|||
const orig = md;
|
||||
|
||||
if (SettingsStore.getValue("feature_latex_maths")) {
|
||||
const patternNames = ["tex", "latex"];
|
||||
const patternTypes = ["display", "inline"];
|
||||
const patternNames = ["tex", "latex"] as const;
|
||||
const patternTypes = ["display", "inline"] as const;
|
||||
const patternDefaults = {
|
||||
tex: {
|
||||
// detect math with tex delimiters, inline: $...$, display $$...$$
|
||||
|
@ -118,7 +118,7 @@ export function htmlSerializeFromMdIfNeeded(md: string, { forceHTML = false } =
|
|||
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] ||
|
||||
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