diff --git a/src/main/resources/public/src/DomUtil.ts b/src/main/resources/public/src/DomUtil.ts index 5f5e67d7a..883691df9 100755 --- a/src/main/resources/public/src/DomUtil.ts +++ b/src/main/resources/public/src/DomUtil.ts @@ -586,7 +586,7 @@ export class DomUtil { to replace on your whole web page */ public highlightText = (rootElm: HTMLElement, text: string) => { if (text.startsWith("\"") && text.endsWith("\"")) { - text = text.replace("\"", ""); + text = text.replaceAll("\"", ""); } const reg = this.escapeRegEx(text); const regex = new RegExp(reg, "i"); // case insensitive search diff --git a/src/main/resources/public/src/Render.ts b/src/main/resources/public/src/Render.ts index e7f90e750..dcadc1190 100755 --- a/src/main/resources/public/src/Render.ts +++ b/src/main/resources/public/src/Render.ts @@ -96,12 +96,12 @@ export class Render { links += `
${tour.name}
` }); } - return val.replace("{{" + cmd + "}}", links); + return val.replaceAll("{{" + cmd + "}}", links); } injectAdminLink = (val: string, cmd: string, buttonText: string) => { // NOTE: Our Singleton class puts a global copy of S on the browser 'window object', so that's why this script works. - return val.replace("{{" + cmd + "}}", `${buttonText}`); + return val.replaceAll("{{" + cmd + "}}", `${buttonText}`); } renderLinkLabel = (id: string) => { diff --git a/src/main/resources/public/src/RpcUtil.ts b/src/main/resources/public/src/RpcUtil.ts index 410ce5259..d83e17ac4 100755 --- a/src/main/resources/public/src/RpcUtil.ts +++ b/src/main/resources/public/src/RpcUtil.ts @@ -331,8 +331,8 @@ export class RpcUtil { if (!this.logVerbose) { let trace = res.stackTrace; if (trace) { - trace = trace.replace("\\n", "\n"); - trace = trace.replace("\\t", "\t"); + trace = trace.replaceAll("\\n", "\n"); + trace = trace.replaceAll("\\t", "\t"); // remove this so the prettyPrint doesn't contain it. delete res.stackTrace; diff --git a/src/main/resources/public/src/SpeechEngine.ts b/src/main/resources/public/src/SpeechEngine.ts index 1f024c6d4..c7fe8a3f4 100755 --- a/src/main/resources/public/src/SpeechEngine.ts +++ b/src/main/resources/public/src/SpeechEngine.ts @@ -293,11 +293,11 @@ export class SpeechEngine { // Let's rip out all the hashtags and at symbols mainly just so we can read // text full of hashtags and have it sound good. - sayThis = sayThis.replace("#", " "); + sayThis = sayThis.replaceAll("#", " "); // replace backquote or else the engine will pronounce the actual word 'backquote' which we of courose // do not want. - sayThis = sayThis.replace("`", "\""); + sayThis = sayThis.replaceAll("`", "\""); utter = new SpeechSynthesisUtterance(sayThis); @@ -433,16 +433,16 @@ export class SpeechEngine { preProcessText = (text: string): string => { if (!text) return; // engine will SAY the 'quote' if you leave this here. - text = text.replace(".\"", "."); - text = text.replace(".'", "."); + text = text.replaceAll(".\"", "."); + text = text.replaceAll(".'", "."); - text = text.replace("!\"", "!"); - text = text.replace("!'", "!"); + text = text.replaceAll("!\"", "!"); + text = text.replaceAll("!'", "!"); - text = text.replace("?\"", "?"); - text = text.replace("?'", "?"); + text = text.replaceAll("?\"", "?"); + text = text.replaceAll("?'", "?"); - text = text.replace(/[@#_*]/g, " "); + text = text.replaceAll(/[@#_*]/g, " "); return text; } @@ -506,8 +506,8 @@ export class SpeechEngine { } splitByQuotations = (text: string): string[] => { - text = text.replace("“", "\""); - text = text.replace("”", "\""); + text = text.replaceAll("“", "\""); + text = text.replaceAll("”", "\""); const quoteCount = S.util.countChars(text, "\""); let ret: string[] = null; @@ -551,7 +551,7 @@ export class SpeechEngine { // This is a dirty but clever hack to fix lots of initials like (J.F.K.) // and make them not do any sentence breaks there. for (const char of "ABCDEFGHIJKLMNOPQRSTUVWXYZ") { - text = text.replace(char + ".", char + " "); + text = text.replaceAll(char + ".", char + " "); } // first split into sentences. diff --git a/src/main/resources/public/src/comp/node/NodeCompMarkdown.ts b/src/main/resources/public/src/comp/node/NodeCompMarkdown.ts index 8d7ab0b49..bbd16cba8 100755 --- a/src/main/resources/public/src/comp/node/NodeCompMarkdown.ts +++ b/src/main/resources/public/src/comp/node/NodeCompMarkdown.ts @@ -70,7 +70,7 @@ export class NodeCompMarkdown extends Comp { if (!urls || !val) return val; urls.forEach((url: string) => { if (val.indexOf("(" + url) == -1) { - val = val.replace(url, `[${url}](${url})`); + val = val.replaceAll(url, `[${url}](${url})`); } }); return val; diff --git a/src/main/resources/public/src/comp/node/NodeCompRowHeader.ts b/src/main/resources/public/src/comp/node/NodeCompRowHeader.ts index 18ac3f926..45d197195 100755 --- a/src/main/resources/public/src/comp/node/NodeCompRowHeader.ts +++ b/src/main/resources/public/src/comp/node/NodeCompRowHeader.ts @@ -414,7 +414,7 @@ export class NodeCompRowHeader extends Div { } let fileName = S.props.getPropStr(J.NodeProp.FILE_NAME, this.node); if (fileName) { - fileName = fileName.replace("/index.md", "/*"); + fileName = fileName.replaceAll("/index.md", "/*"); floatUpperRightDiv.addChild(new Span(fileName, { className: "nodeFileNameDisp", title: "File for Markdown Export" diff --git a/src/main/resources/public/src/dlg/SearchContentDlg.ts b/src/main/resources/public/src/dlg/SearchContentDlg.ts index 9660ac712..de5876e8b 100755 --- a/src/main/resources/public/src/dlg/SearchContentDlg.ts +++ b/src/main/resources/public/src/dlg/SearchContentDlg.ts @@ -95,42 +95,42 @@ export class SearchContentDlg extends DialogBase { } }, getValue: (): boolean => this.getState().blockedWords - }) : null, + }, "marginTop") : null, new Checkbox("Substring", null, { setValue: (checked: boolean) => { SearchContentDlg.dlgState.fuzzy = checked; this.mergeState({ fuzzy: checked }); }, getValue: (): boolean => this.getState().fuzzy - }), + }, "marginTop"), new Checkbox("Case Sensitive", null, { setValue: (checked: boolean) => { SearchContentDlg.dlgState.caseSensitive = checked; this.mergeState({ caseSensitive: checked }); }, getValue: (): boolean => this.getState().caseSensitive - }), + }, "marginTop"), new Checkbox("Recursive", null, { setValue: (checked: boolean) => { SearchContentDlg.dlgState.recursive = checked; this.mergeState({ recursive: checked }); }, getValue: (): boolean => this.getState().recursive - }), + }, "marginTop"), new Checkbox("Has Attachment", null, { setValue: (checked: boolean) => { SearchContentDlg.dlgState.requireAttachment = checked; this.mergeState({ requireAttachment: checked }); }, getValue: (): boolean => this.getState().requireAttachment - }), + }, "marginTop"), new Checkbox("Has Date", null, { setValue: (checked: boolean) => { SearchContentDlg.dlgState.requireDate = checked; this.mergeState({ requireDate: checked }); }, getValue: (): boolean => this.getState().requireDate - }) + }, "marginTop") ], "marginBottom"), new FlexRowLayout([ diff --git a/src/main/resources/public/src/tabs/TTSView.ts b/src/main/resources/public/src/tabs/TTSView.ts index 98321d151..94299214c 100755 --- a/src/main/resources/public/src/tabs/TTSView.ts +++ b/src/main/resources/public/src/tabs/TTSView.ts @@ -147,7 +147,7 @@ export class TTSView extends AppTab { this.makeVoiceChooser(C.LOCALDB_VOICE_INDEX, true), S.speech.USE_VOICE2 ? this.makeVoiceChooser(C.LOCALDB_VOICE2_INDEX, false) : null, this.makeRateChooser(), - new Checkbox("Text Input", { className: "bigMarginLeft" }, { + new Checkbox("Text Input", { className: "bigMarginLeft marginTop" }, { setValue: (checked: boolean) => dispatch("setTtsInput", s => { if (!checked) { TTSView.textAreaState.setValue("");