feat: render comment bodies as markdown in issue and PR detail views #238
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The issue detail and PR detail views render the issue/PR body via
RenderMarkdown(Gitea API markdown endpoint), but the comments thread still displays raw plain text in both templates.ROADMAP Phase 2.2 specifies a "Comments thread" in both Issue Detail and PR Detail views, consistent with the rest of the markdown-first design.
What to do
In the
IssueDetailhandler (internal/handlers/handlers.go):GetIssueComments, iterate and callRenderMarkdownfor each non-emptyBodyRenderedBody template.HTMLfield to the comment struct (or pass a parallel render slice into the template data)slog.Warnon render failure and fall back to plain textSame pattern in the
PullDetailhandler for PR comments.Update
internal/templates/issue_detail.htmlandpull_detail.html:{{if .RenderedBody}}...{{else}}{{.Body}}{{end}}pattern already used for the issue/PR bodyAcceptance Criteria
template.HTMLand comes from Gitea API endpoint onlyRoadmap Reference
ROADMAP Phase 2.2 — Issue Detail and PR Detail: "Comments thread"
[Repo Manager] Triaged and assigned to @AI-Engineer (developer). This is a P1 medium feature -- render comment bodies as markdown in issue and PR detail views. This issue is unblocked and ready for implementation.