« get me outta code hell

language: drop externalLinkSpec prop, just import directly - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/language.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-10-20 13:09:58 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-10-20 13:09:58 -0300
commitc3b4b0bebca07a69f6c47d680f0c18d859cb599c (patch)
tree0dcdc81d6d421b1decb1ee66d018de70e3c566f8 /src/data/language.js
parent2374124f0b9f758021648e8bd3d99c205b2e3aea (diff)
language: drop externalLinkSpec prop, just import directly preview
this lets us totally drop "internal" but exported function
initializeLanguageObject - we'll still need to provide the
external link spec in essentially the exact same way in the
future, when external link spec is dynamic, but presently
there's no need for this function or providing at all.
Diffstat (limited to 'src/data/language.js')
-rw-r--r--src/data/language.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/data/language.js b/src/data/language.js
index 8dc06e7e..e97267c0 100644
--- a/src/data/language.js
+++ b/src/data/language.js
@@ -8,7 +8,6 @@ import yaml from 'js-yaml';
 
 import {annotateError, annotateErrorWithFile, showAggregate, withAggregate}
   from '#aggregate';
-import {externalLinkSpec} from '#external-links';
 import {colors, logWarn} from '#cli';
 import {empty, splitKeys, withEntries} from '#sugar';
 import T from '#things';
@@ -247,16 +246,8 @@ async function processLanguageSpecFromFile(file, processLanguageSpecOpts) {
   }
 }
 
-export function initializeLanguageObject() {
-  const language = new Language();
-
-  language.externalLinkSpec = externalLinkSpec;
-
-  return language;
-}
-
 export async function processLanguageFile(file) {
-  const language = initializeLanguageObject();
+  const language = new Language()
   const properties = await processLanguageSpecFromFile(file);
   return Object.assign(language, properties);
 }
@@ -267,7 +258,7 @@ export function watchLanguageFile(file, {
   const basename = path.basename(file);
 
   const events = new EventEmitter();
-  const language = initializeLanguageObject();
+  const language = new Language();
 
   let emittedReady = false;
   let successfullyAppliedLanguage = false;