From 070afce1ef75dac965e979536b0ac7a9170607df Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 12 Apr 2024 08:27:54 -0300 Subject: language: refactor languageOptionRegex --- src/data/things/language.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data/things/language.js b/src/data/things/language.js index 5573ce28..78ac422d 100644 --- a/src/data/things/language.js +++ b/src/data/things/language.js @@ -17,6 +17,8 @@ import { import {externalFunction, flag, name} from '#composite/wiki-properties'; +export const languageOptionRegex = /{(?[A-Z0-9_]+)}/g; + export class Language extends Thing { static [Thing.getPropertyDescriptors] = () => ({ // Update & expose @@ -201,7 +203,7 @@ export class Language extends Thing { const output = this.#iterateOverTemplate({ template: this.strings[key], - match: /{(?[A-Z0-9_]+)}/g, + match: languageOptionRegex, insert: ({name: optionName}, canceledForming) => { if (optionsMap.has(optionName)) { -- cgit 1.3.0-6-gf8a5