spec-up-t 1.6.1 → 1.6.3-beta.1

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.
@@ -24,27 +24,15 @@
24
24
  },
25
25
  "external_specs": [
26
26
  {
27
- "external_spec": "vLEI",
28
- "gh_page": "https://henkvancann.github.io/vlei-glossary/",
29
- "url": "https://github.com/henkvancann/vlei-glossary",
27
+ "external_spec": "ExtRef1",
28
+ "gh_page": "https://trustoverip.github.io/spec-up-t-demo-external-ref-1/",
29
+ "url": "https://github.com/trustoverip/spec-up-t-demo-external-ref-1",
30
30
  "terms_dir": "spec/terms-definitions"
31
31
  },
32
32
  {
33
- "external_spec": "KERISuite",
34
- "gh_page": "https://weboftrust.github.io/kerisuite-glossary/",
35
- "url": "https://github.com/weboftrust/kerisuite-glossary",
36
- "terms_dir": "spec/terms-definitions"
37
- },
38
- {
39
- "external_spec": "ToIP",
40
- "gh_page": "https://glossary.trustoverip.org/",
41
- "url": "https://github.com/trustoverip/ctwg-main-glossary",
42
- "terms_dir": "spec/terms-definitions"
43
- },
44
- {
45
- "external_spec": "GenIT",
46
- "gh_page": "https://trustoverip.github.io/ctwg-general-glossary/",
47
- "url": "https://github.com/trustoverip/ctwg-general-glossary",
33
+ "external_spec": "ExtRef2",
34
+ "gh_page": "https://trustoverip.github.io/spec-up-t-demo-external-ref-2/",
35
+ "url": "https://github.com/trustoverip/spec-up-t-demo-external-ref-2",
48
36
  "terms_dir": "spec/terms-definitions"
49
37
  }
50
38
  ],
@@ -19,7 +19,7 @@ function validateReferences(references, definitions, render) {
19
19
  if (unresolvedRefs.length > 0) {
20
20
  Logger.warn(`Unresolved References: ${unresolvedRefs.join(',')}`, {
21
21
  context: 'These terms are referenced in your spec but not defined',
22
- hint: 'Add [[def: term]] definitions for these terms in your terminology files, or check for typos in [[ref: term]] references',
22
+ hint: 'Add [[def: term]] definitions or [[tref: repo, term]] transclusion for these terms in your terminology files, or check for typos in [[ref: term]] references',
23
23
  details: `Count: ${unresolvedRefs.length} unresolved term(s)`
24
24
  });
25
25
  }
@@ -281,10 +281,18 @@ function extractTermsFromHtml(externalSpec, html) {
281
281
  const classArray = dtClasses ? dtClasses.split(/\s+/).filter(Boolean) : [];
282
282
  const termClasses = classArray.filter(cls => cls === 'term-local' || cls === 'term-external');
283
283
 
284
- const dd = $termElement.next('dd');
284
+ // Extract ALL consecutive <dd> elements following this <dt>
285
+ // Terms can have multiple <dd> blocks for extended definitions
286
+ const ddElements = [];
287
+ let nextElement = $termElement.next();
288
+ while (nextElement.length > 0 && nextElement[0].tagName === 'dd') {
289
+ ddElements.push(nextElement);
290
+ nextElement = nextElement.next();
291
+ }
285
292
 
286
- if (dd.length > 0) {
287
- const ddContent = $.html(dd); // Store the complete DD content once
293
+ if (ddElements.length > 0) {
294
+ // Combine all <dd> elements into a single HTML string
295
+ const ddContent = ddElements.map(dd => $.html(dd)).join('\n'); // Store the complete DD content
288
296
 
289
297
  // Create a term object for each ID found in this dt element
290
298
  // This handles cases where one term definition has multiple aliases