spec-up-t 1.6.0-beta.7 → 1.6.0-beta.9

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.
@@ -364,35 +364,18 @@ dl.terms-and-definitions-list span.term-external {
364
364
  /* ====== TERM REFERENCE STYLING ====== */
365
365
  /* Inline term references (clickable links to definitions) */
366
366
  .term-reference {
367
- padding: 3px 3px 3px 1.5em;
368
- background-color: var(--term-reference-bg);
369
- border-radius: 0.25rem;
370
- position: relative;
371
367
  text-decoration: none;
372
- box-shadow: inset 0 0 0 1px var(--term-reference-border);
373
368
  transition: box-shadow 0.3s ease-in-out;
374
- display: inline-block;
375
- line-height: 1.4;
369
+ border-bottom: 1px dashed var(--term-reference-border);
370
+ padding: 0 1px;
371
+ margin-left: 0.1rem;
372
+ margin-right: 0.1em;
376
373
  }
377
374
 
378
375
  .term-reference:hover {
379
376
  box-shadow: inset 0 0 0 3px var(--term-reference-border);
380
377
  }
381
378
 
382
- /* Arrow icon for all term references using SVG data URI */
383
- .term-reference::after {
384
- content: "";
385
- position: absolute;
386
- top: 0.45rem;
387
- left: 0.3rem;
388
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");
389
- background-size: contain;
390
- background-repeat: no-repeat;
391
- background-position: center;
392
- width: 0.8rem;
393
- height: 0.8rem;
394
- }
395
-
396
379
  /* Remove arrow for term references that are dt elements or inside dt elements */
397
380
  dt.term-reference::after,
398
381
  dt .term-reference::after {
@@ -34,7 +34,7 @@ Example of how to use these variables in your CSS:
34
34
  /* Warning/error text */
35
35
  --term-reference-bg: rgba(234, 245, 251, 0.1);
36
36
  /* Light blue background for term references - more transparent */
37
- --term-reference-border: #ddf0fb;
37
+ --term-reference-border: #a3dafb;
38
38
  /* Light blue border for term references */
39
39
  --table-border: #ddd;
40
40
  /* Light gray border for tables */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-up-t",
3
- "version": "1.6.0-beta.7",
3
+ "version": "1.6.0-beta.9",
4
4
  "description": "Technical specification drafting tool that generates rich specification documents from markdown. Forked from https://github.com/decentralized-identity/spec-up by Daniel Buchner (https://github.com/csuwildcat)",
5
5
  "main": "./index",
6
6
  "repository": {
@@ -86,8 +86,50 @@ async function render(spec, assets, sharedVars, config, template, assetsGlobal,
86
86
 
87
87
  md[spec.katex ? "enable" : "disable"](['math_block', 'math_inline']);
88
88
 
89
- // `render` is the rendered HTML
90
- let renderedHtml = md.render(doc);
89
+ // Suppress markdown-it-attrs table errors during rendering
90
+ //
91
+ // Background: markdown-it-attrs can throw "Cannot read properties of null (reading 'colsnum')"
92
+ // errors when processing malformed tables. These errors are:
93
+ // 1. Non-blocking: The rendering continues and index.html is generated successfully
94
+ // 2. Caught proactively: The markdown-tables healthcheck detects these issues
95
+ // 3. Noisy: They clutter the console output without providing actionable information
96
+ //
97
+ // Solution: Intercept console.error during md.render() to suppress only these specific
98
+ // table-related errors while allowing all other errors to pass through normally.
99
+ const originalConsoleError = console.error;
100
+ let suppressNext = false;
101
+ console.error = (...args) => {
102
+ const message = args[0]?.toString() || '';
103
+
104
+ // Check if this is the first console.error call with the error message
105
+ if (message.includes('markdown-it-attrs: Error in pattern') &&
106
+ message.includes('tables') &&
107
+ message.includes('colsnum')) {
108
+ // Suppress this error and the next stack trace
109
+ suppressNext = true;
110
+ return;
111
+ }
112
+
113
+ // Check if this is the stack trace following the suppressed error
114
+ if (suppressNext) {
115
+ suppressNext = false;
116
+ // Also suppress if this looks like a stack trace for colsnum error
117
+ if (message.includes('colsnum') || message.includes('at Object.transform')) {
118
+ return;
119
+ }
120
+ }
121
+
122
+ // Let all other errors through
123
+ originalConsoleError.apply(console, args);
124
+ };
125
+
126
+ try {
127
+ // `render` is the rendered HTML
128
+ renderedHtml = md.render(doc);
129
+ } finally {
130
+ // Always restore console.error
131
+ console.error = originalConsoleError;
132
+ }
91
133
 
92
134
  // Apply the fix for broken definition list structures
93
135
  renderedHtml = fixDefinitionListStructure(renderedHtml);