mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-27 04:07:08 +00:00
fix #976
This commit is contained in:
parent
ec2423ad7c
commit
cc8f5add6e
15 changed files with 235 additions and 57 deletions
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/gogits/gogs/modules/middleware"
|
||||
)
|
||||
|
||||
// Render an arbitrary Markdown document.
|
||||
// https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-an-arbitrary-markdown-document
|
||||
func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) {
|
||||
if ctx.HasApiError() {
|
||||
ctx.APIError(422, "", ctx.GetErrMsg())
|
||||
|
@ -30,7 +30,7 @@ func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) {
|
|||
}
|
||||
}
|
||||
|
||||
// Render a Markdown document in raw mode.
|
||||
// https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-a-markdown-document-in-raw-mode
|
||||
func MarkdownRaw(ctx *middleware.Context) {
|
||||
body, err := ctx.Req.Body().Bytes()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue