aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-12-10 16:37:54 -0500
committerUnknwon <joe2010xtmf@163.com>2014-12-10 16:37:54 -0500
commitbc8721fb6c704255fd8be9edc9372e4d17adaee9 (patch)
tree1bc335b23b84432799440bb7572942410ce00b33 /routers/api/v1
parent01ba7717838c01c719cca34d3fe446c547c9ada4 (diff)
downloadgitea-bc8721fb6c704255fd8be9edc9372e4d17adaee9.tar.gz
gitea-bc8721fb6c704255fd8be9edc9372e4d17adaee9.zip
Finish new UI for release page
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/miscellaneous.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/api/v1/miscellaneous.go b/routers/api/v1/miscellaneous.go
index b3291fc126..0da5dc1567 100644
--- a/routers/api/v1/miscellaneous.go
+++ b/routers/api/v1/miscellaneous.go
@@ -20,6 +20,11 @@ func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) {
return
}
+ if len(form.Text) == 0 {
+ ctx.Write([]byte(""))
+ return
+ }
+
switch form.Mode {
case "gfm":
ctx.Write(base.RenderMarkdown([]byte(form.Text),