Skip to content

Commit 2d50a45

Browse files
committed
Remove dedent
1 parent 8f03c22 commit 2d50a45

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

code/core/src/core-server/manifest.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { groupBy } from 'storybook/internal/common';
22

3-
import { dedent } from 'ts-dedent';
4-
53
import type { ComponentManifest, ComponentsManifest } from '../types';
64

75
// AI generated manifests/components.html page
@@ -65,7 +63,7 @@ export function renderManifestComponentsPage(manifest: ComponentsManifest) {
6563
})
6664
.join('');
6765

68-
return dedent`<!doctype html>
66+
return `<!doctype html>
6967
<html lang="en">
7068
<head>
7169
<meta charset="utf-8" />
@@ -273,7 +271,7 @@ function analyzeComponent(c: ComponentManifest) {
273271
}
274272

275273
function note(title: string, bodyHTML: string, kind: 'warn' | 'err') {
276-
return dedent`
274+
return `
277275
<div class="note ${kind}">
278276
<div class="note-title">${esc(title)}</div>
279277
<div class="note-body">${bodyHTML}</div>
@@ -314,7 +312,8 @@ function renderComponentCard(key: string, c: ComponentManifest, i: number) {
314312
.join('')
315313
: '';
316314

317-
return dedent`
315+
esc(c.error?.message || 'Unknown error');
316+
return `
318317
<article class="card ${a.hasComponentError ? 'has-error' : 'no-error'} ${a.hasWarns ? 'has-warn' : 'no-warn'} ${a.exampleErrors ? 'has-example-error' : 'no-example-error'}" role="listitem" aria-label="${esc(c.name || key)}">
319318
<div class="head">
320319
<div class="title">

0 commit comments

Comments
 (0)