Fixed newlines in markdown line comments

This commit is contained in:
Alexandros Naskos 2020-06-05 00:19:00 +03:00
parent b0bb8888d3
commit 563c4f0294
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ fn collectDocComments(allocator: *std.mem.Allocator, tree: *ast.Tree, doc_commen
}
}
return try std.mem.join(allocator, "\n", lines.items);
return try std.mem.join(allocator, "\\\n", lines.items);
}
/// Gets a function signature (keywords, name, return value)

View File

@ -376,7 +376,7 @@ fn hoverSymbol(id: i64, analysis_ctx: *DocumentStore.AnalysisContext, decl: *std
else => analysis.nodeToString(result.analysis_ctx.tree(), result.decl) orelse return try respondGeneric(id, null_result_response),
};
const md_string = try std.fmt.allocPrint(&analysis_ctx.arena.allocator, "```zig\n{}\n```\n```markdown\n{}\n```", .{ signature_str, doc_str });
const md_string = try std.fmt.allocPrint(&analysis_ctx.arena.allocator, "```zig\n{}\n```\n{}", .{ signature_str, doc_str });
try send(types.Response{
.id = .{ .Integer = id },
.result = .{