@gsa-tts/graymatter-ui 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gsa-tts/graymatter-ui",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { createEventDispatcher, onMount } from 'svelte';
3
- import { subNavReady } from '@gsa-tts/graymatter-ui/stores/subNavReadyStore';
3
+ import { subNavReady } from '../stores/subNavReadyStore';
4
4
  import type { SubNavData, SubNavItem } from '../types/subnav.ts';
5
5
  import ApiDocSubNavList from './ApiDocSubNavList.svelte';
6
6
 
@@ -129,9 +129,24 @@ const subNavData = generateApiDocumentationNavData(apiDocsMetadata);
129
129
  .replace(/'/g, '&#39;');
130
130
  }
131
131
  function linkify(input) {
132
+ // Handle array input - convert to paragraphs
133
+ if (Array.isArray(input)) {
134
+ return input
135
+ .map(paragraph => {
136
+ const processed = linkifySingle(String(paragraph));
137
+ return `<p>${processed}</p>`;
138
+ })
139
+ .join('');
140
+ }
141
+
142
+ // Handle string input
143
+ return linkifySingle(String(input));
144
+ }
145
+
146
+ function linkifySingle(input) {
132
147
  // Preserve markdown links [label](url) using placeholders
133
148
  const placeholders = [];
134
- const withPlaceholders = String(input).replace(
149
+ const withPlaceholders = input.replace(
135
150
  /\[([^\]]+)\]\(((https?:\/\/|www\.)[^\s)]+)\)/gi,
136
151
  (m, label, href) => {
137
152
  const safeLabel = escapeHtml(label);