Skip to content

Commit a9618e8

Browse files
nam-hleclaude
andauthored
fix: use paragraph breaks between hover detail lines (#528)
## Summary - Fix hover markdown rendering where detail lines (Dependencies, Group, Inputs, Outputs) appeared inline instead of on separate lines - Changed detail join separator from single `\n` (spread into lines array) to `\n\n` (paragraph breaks) so markdown renderers display each detail on its own line Closes #514 ## Test plan - [x] Added test verifying `**Dependencies**: build\n\n**Group**: publish` paragraph break formatting - [x] All 52 language-server tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3a266ec commit a9618e8

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/language-server/src/hover.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function formatHoverContent(reg: TaskRegistration): string {
3535
}
3636

3737
if (details.length > 0) {
38-
lines.push("", "---", ...details);
38+
lines.push("", "---", details.join("\n\n"));
3939
}
4040
}
4141

packages/language-server/test/hover.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ describe("getHover", () => {
7676
expect(value).toContain("**compile**");
7777
});
7878

79+
it("separates detail lines with paragraph breaks", async () => {
80+
const { doc, analysis } = await setupFixture("valid.ts");
81+
const content = doc.getText();
82+
const offset = findStringOffset(content, "release");
83+
const position = doc.positionAt(offset);
84+
const hover = getHover(analysis, position, doc);
85+
86+
expect(hover).not.toBeNull();
87+
const value = (hover!.contents as { value: string }).value;
88+
expect(value).toContain("**Dependencies**: build\n\n**Group**: publish");
89+
});
90+
7991
it("returns null for non-task strings", async () => {
8092
const { doc, analysis } = await setupFixture("valid.ts");
8193
const position = doc.positionAt(0);

0 commit comments

Comments
 (0)