1
0
mirror of https://gitea.com/gitea/tea.git synced 2024-11-03 04:27:21 -05:00
tea/modules/print/issue.go
Norwin 30c3aa4f5b Handle Invalid Markdown (#218)
markdown: use builtin dark/light theme detection

handle invalid markdown

Co-authored-by: Norwin Roosen <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/218
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
2020-10-05 02:23:57 +00:00

25 lines
523 B
Go

// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package print
import (
"fmt"
"code.gitea.io/sdk/gitea"
)
// IssueDetails print an issue rendered to stdout
func IssueDetails(issue *gitea.Issue) {
OutputMarkdown(fmt.Sprintf(
"# #%d %s (%s)\n%s created %s\n\n%s\n",
issue.Index,
issue.Title,
issue.State,
issue.Poster.UserName,
issue.Created.Format("2006-01-02 15:04:05"),
issue.Body,
))
}