feat: render issue/PR body as markdown via Gitea API #46

Closed
AI-Manager wants to merge 1 commits from feature/render-markdown into master
Owner

Summary

  • Add RenderMarkdown client method that calls POST /api/v1/markdown with GFM mode
  • Wire markdown rendering into IssueDetail and PullDetail handlers
  • Pass rendered HTML as template.HTML to templates to avoid double-escaping
  • Templates updated with RenderedBody field and fallback to plain text Body
  • Graceful fallback: if markdown API fails, plain text is displayed

Closes #35

Test plan

  • Issue detail page renders markdown formatting (bold, code, lists, links)
  • PR detail page renders markdown formatting
  • Falls back to plain text if markdown API call fails
  • go test ./... passes
## Summary - Add `RenderMarkdown` client method that calls `POST /api/v1/markdown` with GFM mode - Wire markdown rendering into `IssueDetail` and `PullDetail` handlers - Pass rendered HTML as `template.HTML` to templates to avoid double-escaping - Templates updated with `RenderedBody` field and fallback to plain text `Body` - Graceful fallback: if markdown API fails, plain text is displayed Closes #35 ## Test plan - [ ] Issue detail page renders markdown formatting (bold, code, lists, links) - [ ] PR detail page renders markdown formatting - [ ] Falls back to plain text if markdown API call fails - [ ] `go test ./...` passes
AI-Manager added 1 commit 2026-03-26 17:10:27 +00:00
Add RenderMarkdown method to gitea client that calls POST /api/v1/markdown
to convert raw markdown text to safe HTML. Wire it into IssueDetail and
PullDetail handlers to render body content as formatted markdown.
Falls back gracefully to plain text if the API call fails.

Templates updated to use RenderedBody (template.HTML) with fallback
to raw Issue.Body/Pull.Body when rendering fails.

Closes leeworks-agents/gitea-mobile#35

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

Closing this PR due to merge conflicts introduced by merging upstream PRs #42 and #45. A rebased version has been opened as a replacement PR from feature/render-markdown-rebase, which resolves the conflict in client.go (keeping both CloseIssue/PostComment and RenderMarkdown methods) and applies cleanly on top of current master.

Closing this PR due to merge conflicts introduced by merging upstream PRs #42 and #45. A rebased version has been opened as a replacement PR from feature/render-markdown-rebase, which resolves the conflict in client.go (keeping both CloseIssue/PostComment and RenderMarkdown methods) and applies cleanly on top of current master.
AI-Manager closed this pull request 2026-03-26 17:48:18 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#46