Skip to content

Commit 08b4561

Browse files
committed
fix: attempt at markdown renderer undefined
1 parent 6769668 commit 08b4561

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

npm-app/src/display/markdown-renderer.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,17 @@ export class MarkdownStreamRenderer {
101101
this.md.use(terminal, {
102102
style: {
103103
// Add spacing after headings
104-
heading: (text: string) => `\n${text}\n`,
104+
heading: (text: string) => `\n${text || ''}\n`,
105105
// Add spacing around paragraphs
106-
paragraph: (text: string) => `${text}\n`,
106+
paragraph: (text: string) => `${text || ''}\n`,
107107
// Customize list items with Unicode bullet points for unordered lists
108-
listitem: (text: string) => ` • ${text}`,
108+
listitem: (text: string) => ` • ${text || ''}`,
109109
// Customize ordered list items to include periods after numbers
110-
orderedlistitem: (text: string, num: number) => ` ${num}. ${text}`,
110+
orderedlistitem: (text: string, num: number) =>
111+
` ${num || ''}. ${text || ''}`,
111112
// Code blocks should preserve formatting with minimal spacing
112-
code_block: (text: string) => `${text}`,
113-
fence: (text: string, lang?: string) => `${text}`,
113+
code_block: (text: string) => `${text || ''}`,
114+
fence: (text: string, lang?: string) => `${text || ''}`,
114115
},
115116
})
116117

0 commit comments

Comments
 (0)