Skip to content

Commit

Permalink
Merge pull request #179 from tmm/tmm/fix-completion-result-tag
Browse files Browse the repository at this point in the history
fix: completion result closing tag
  • Loading branch information
orta authored Mar 30, 2023
2 parents a2d2b6b + 7777f35 commit f3a2683
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spotty-hairs-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shiki-twoslash": patch
---

Fixed renderer completion result closing tag.
2 changes: 1 addition & 1 deletion packages/shiki-twoslash/src/renderers/twoslash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function twoslashRenderer(lines: Lines, options: HtmlRendererOptions & Tw
.sort((l, r) => l.name.localeCompare(r.name))
.map(c => {
const after = c.name.substr(query.completionsPrefix?.length || 0)
const name = `<span><span class='result-found'>${query.completionsPrefix || ""}</span>${after}<span>`
const name = `<span><span class='result-found'>${query.completionsPrefix || ""}</span>${after}</span>`
const isDeprecated = c.kindModifiers?.split(",").includes("deprecated")
const liClass = isDeprecated ? "deprecated" : ""
return `<li class='${liClass}'>${name}</li>`
Expand Down

0 comments on commit f3a2683

Please sign in to comment.