« get me outta code hell

external-links: Instagram handles - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-03-30 13:02:46 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-03-30 13:02:46 -0300
commit25806dc2d228d654c29b109ab0411c00bb5990f1 (patch)
tree0c783e9939371c595d5f80f93223fe2b14e27921
parentc58e21df768e52411c3c7b739b01eddf3ae7ef51 (diff)
external-links: Instagram handles
-rw-r--r--src/util/external-links.js9
-rw-r--r--tap-snapshots/test/snapshot/linkExternal.js.test.cjs4
-rw-r--r--test/snapshot/linkExternal.js1
3 files changed, 13 insertions, 1 deletions
diff --git a/src/util/external-links.js b/src/util/external-links.js
index b8b97849..a76c1e95 100644
--- a/src/util/external-links.js
+++ b/src/util/external-links.js
@@ -395,6 +395,15 @@ export const externalLinkSpec = [
 
   {
     match: {domain: 'instagram.com'},
+
+    platform: 'instagram',
+    handle: {pathname: /^[^/]+/},
+
+    icon: 'instagram',
+  },
+
+  {
+    match: {domain: 'instagram.com'},
     platform: 'instagram',
     icon: 'instagram',
   },
diff --git a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs
index 1d5cb425..16175861 100644
--- a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs
+++ b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs
@@ -102,7 +102,8 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context
 <a href="https://hsmusic.wiki/feedback/" class="nowrap">HSMusic</a>
 <a href="https://archive.org/details/a-life-well-lived" class="nowrap">Internet Archive</a>
 <a href="https://archive.org/details/VastError_Volume1/11+Renaissance.mp3" class="nowrap">Internet Archive</a>
-<a href="https://www.instagram.com/levc_egm/" class="nowrap">Instagram</a>
+<a href="https://instagram.com/bass.and.noises" class="nowrap">bass.and.noises</a>
+<a href="https://www.instagram.com/levc_egm/" class="nowrap">levc_egm</a>
 <a href="https://tuyoki.itch.io/" class="nowrap">tuyoki</a>
 <a href="https://itch.io/profile/bravelittletoreador" class="nowrap">bravelittletoreador</a>
 <a href="https://ko-fi.com/gnaach" class="nowrap">gnaach</a>
@@ -171,6 +172,7 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context
 <a href="https://hsmusic.wiki/feedback/" class="nowrap">HSMusic</a>
 <a href="https://archive.org/details/a-life-well-lived" class="nowrap">Internet Archive</a>
 <a href="https://archive.org/details/VastError_Volume1/11+Renaissance.mp3" class="nowrap">Internet Archive</a>
+<a href="https://instagram.com/bass.and.noises" class="nowrap">Instagram</a>
 <a href="https://www.instagram.com/levc_egm/" class="nowrap">Instagram</a>
 <a href="https://tuyoki.itch.io/" class="nowrap">itch.io</a>
 <a href="https://itch.io/profile/bravelittletoreador" class="nowrap">itch.io</a>
diff --git a/test/snapshot/linkExternal.js b/test/snapshot/linkExternal.js
index 0b6a4753..a9ce7eb2 100644
--- a/test/snapshot/linkExternal.js
+++ b/test/snapshot/linkExternal.js
@@ -105,6 +105,7 @@ testContentFunctions(t, 'linkExternal (snapshot)', async (t, evaluate) => {
     'https://archive.org/details/VastError_Volume1/11+Renaissance.mp3',
 
     // platform: instagram
+    'https://instagram.com/bass.and.noises',
     'https://www.instagram.com/levc_egm/',
 
     // platform: itch