« get me outta code hell

data, content: extract external link parsing into nicer interface - 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>2023-11-23 11:16:48 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-11-24 13:45:11 -0400
commit8f17782a5f2adbafd031b269195879eb7f79e05f (patch)
treeb15d7930f8de0c4e98e14999a49bff4e1919f4a9 /src/data/language.js
parent921f2d421d6ffb87fab1a2059a6c313b9c81f4f8 (diff)
data, content: extract external link parsing into nicer interface
Diffstat (limited to 'src/data/language.js')
-rw-r--r--src/data/language.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/data/language.js b/src/data/language.js
index 3fc14da..6f774f2 100644
--- a/src/data/language.js
+++ b/src/data/language.js
@@ -7,15 +7,11 @@ import chokidar from 'chokidar';
 import he from 'he'; // It stands for "HTML Entities", apparently. Cursed.
 import yaml from 'js-yaml';
 
-import T from '#things';
+import {externalLinkSpec} from '#external-links';
 import {colors, logWarn} from '#cli';
-
-import {
-  annotateError,
-  annotateErrorWithFile,
-  showAggregate,
-  withAggregate,
-} from '#sugar';
+import {annotateError, annotateErrorWithFile, showAggregate, withAggregate}
+  from '#sugar';
+import T from '#things';
 
 const {Language} = T;
 
@@ -114,6 +110,8 @@ export function initializeLanguageObject() {
   language.escapeHTML = string =>
     he.encode(string, {useNamedReferences: true});
 
+  language.externalLinkSpec = externalLinkSpec;
+
   return language;
 }