From fd4f0dd35b3abde307ce08dc4f49561f44a41fe1 Mon Sep 17 00:00:00 2001 From: Jake Lees Date: Wed, 22 Mar 2023 18:28:30 +1100 Subject: [PATCH] Update format.ts The joys of using the github built in editor --- util/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/format.ts b/util/format.ts index 8745961..d5acb6b 100644 --- a/util/format.ts +++ b/util/format.ts @@ -17,7 +17,7 @@ const DYN_FUNC_REGEX = */ const DYN_NESTED_REGEX = /\{\{(.*?)\}\}(?:\|\|(.*?)\|\|)?/gs; -export function format(str: string = '', opts: Record = {}) { +export function format(str: string = "", opts: Record = {}) { // Find anything matching something similar to [[~ {object.nested.key} 1: `string` | 2: `{{object.second.nested.key}} string` | 3: `string` | ... | default: `string` ]] // and replace it with the correct string depending on the value of the object.nested.key const translated = str.replaceAll(