diff --git a/ts/a11y/explorer/KeyExplorer.ts b/ts/a11y/explorer/KeyExplorer.ts index 4e4d2e6408..8680d9e49e 100644 --- a/ts/a11y/explorer/KeyExplorer.ts +++ b/ts/a11y/explorer/KeyExplorer.ts @@ -383,7 +383,7 @@ export class SpeechExplorer this.Start(); this.backTab = event.target === this.img; } else if (!this.focusSpeech) { - this.speak(''); // don't speak initial equation until click event + this.speak(''); // don't speak initial equation until click event } this.clicked = null; } diff --git a/ts/a11y/explorer/MouseExplorer.ts b/ts/a11y/explorer/MouseExplorer.ts index 9642eb055f..7a4a63781c 100644 --- a/ts/a11y/explorer/MouseExplorer.ts +++ b/ts/a11y/explorer/MouseExplorer.ts @@ -22,12 +22,7 @@ */ import type { ExplorerMathDocument } from '../explorer.js'; -import { - DummyRegion, - Region, - HoverRegion, - ToolTip, -} from './Region.js'; +import { DummyRegion, Region, HoverRegion, ToolTip } from './Region.js'; import { Explorer, AbstractExplorer } from './Explorer.js'; import { ExplorerPool } from './ExplorerPool.js'; import type { ExplorerMathItem } from '../explorer.js'; diff --git a/ts/handlers/html/HTMLDomStrings.ts b/ts/handlers/html/HTMLDomStrings.ts index 13c742bbe8..c639086c7b 100644 --- a/ts/handlers/html/HTMLDomStrings.ts +++ b/ts/handlers/html/HTMLDomStrings.ts @@ -47,8 +47,7 @@ export type HTMLNodeList = [N | T, number][]; * @template D The Document node class */ export type HTMLTagData = - | string - | ((node: N, adaptor: DOMAdaptor) => string); + string | ((node: N, adaptor: DOMAdaptor) => string); /*****************************************************************/ @@ -62,26 +61,36 @@ export type HTMLDOMSTRINGS_OPTIONS = { // Tags to be included in the text (and what text to replace them // with). // - includeHtmlTags: {[tag: string]: HTMLTagData, T, D>}; + includeHtmlTags: { [tag: string]: HTMLTagData, T, D> }; // // The class name of elements whose contents should NOT be processed // by tex2jax. Note that this is used as a regular expression, so // be sure to quote any regexp special characters. // - ignoreHtmlClass: string, + ignoreHtmlClass: string; // // The class name of elements whose contents SHOULD be processed // when they appear inside ones that are ignored. Note that this is // used as a regular expression, so be sure to quote any regexp // special characters. // - processHtmlClass: string, + processHtmlClass: string; }; const options: HTMLDOMSTRINGS_OPTIONS = { - skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', - 'math', 'select', 'option', 'mjx-container'], - includeHtmlTags: expandable({br: '\n', wbr: '', '#comment': ''}), + skipHtmlTags: [ + 'script', + 'noscript', + 'style', + 'textarea', + 'pre', + 'code', + 'math', + 'select', + 'option', + 'mjx-container', + ], + includeHtmlTags: expandable({ br: '\n', wbr: '', '#comment': '' }), ignoreHtmlClass: 'mathjax_ignore', processHtmlClass: 'mathjax_process', }; diff --git a/ts/input/tex/newcommand/NewcommandMethods.ts b/ts/input/tex/newcommand/NewcommandMethods.ts index df5552885c..3fc2fb51af 100644 --- a/ts/input/tex/newcommand/NewcommandMethods.ts +++ b/ts/input/tex/newcommand/NewcommandMethods.ts @@ -51,8 +51,16 @@ const NewcommandMethods: { [key: string]: ParseMethod } = { const n = NewcommandUtil.GetArgCount(parser, name); const opt = parser.GetBrackets(name); const def = parser.GetArgument(name); - if (!provide || (!parser.lookup(HandlerType.MACRO, cs) && !parser.lookup(HandlerType.DELIMITER, '\\' + cs))) { - NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [def, n, opt]); + if ( + !provide || + (!parser.lookup(HandlerType.MACRO, cs) && + !parser.lookup(HandlerType.DELIMITER, '\\' + cs)) + ) { + NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [ + def, + n, + opt, + ]); } parser.Push(parser.itemFactory.create('null')); }, diff --git a/ts/ui/menu/Menu.ts b/ts/ui/menu/Menu.ts index fc189af8d2..dcff816284 100644 --- a/ts/ui/menu/Menu.ts +++ b/ts/ui/menu/Menu.ts @@ -1675,7 +1675,10 @@ export class Menu { // Remove unwanted attributes // if (!this.settings.showSRE) { - svg = svg.replace(/ (?:data-semantic-.*?|data-collapse-.*?|data-speech-node)=".*?"/g, ''); + svg = svg.replace( + / (?:data-semantic-.*?|data-collapse-.*?|data-speech-node)=".*?"/g, + '' + ); } if (!this.settings.showTex) { svg = svg.replace(/ data-latex(?:-item)?=".*?"/g, '');