Skip to content

Commit 3d5c667

Browse files
committed
chore: implement nitpicks suggested by coderabbit
1 parent a61d166 commit 3d5c667

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

server/utils/docs/render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async function renderMergedSymbol(
141141
jsDocTagsPromise,
142142
])
143143

144-
if (signatures.length > 0) {
144+
if (highlightedSignature) {
145145
lines.push(`<div class="docs-signature">${highlightedSignature}</div>`)
146146

147147
if (symbol.nodes.length > MAX_OVERLOAD_SIGNATURES) {

server/utils/docs/text.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ export async function renderMarkdown(text: string, symbolLookup: SymbolLookup):
135135
codeBlockData.map(({ lang, code }) => highlightCodeBlock(code, lang)),
136136
)
137137

138-
for (let i = 0; i < highlightedCodeBlocks.length; i++) {
139-
const highlighted = highlightedCodeBlocks[i]!
138+
highlightedCodeBlocks.forEach((highlighted, i) => {
140139
result = result.replace(`__CODE_BLOCK_${i}__`, highlighted)
141-
}
140+
})
142141

143142
return result
144143
}

0 commit comments

Comments
 (0)