From bc8721fb6c704255fd8be9edc9372e4d17adaee9 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 10 Dec 2014 16:37:54 -0500 Subject: Finish new UI for release page --- routers/api/v1/miscellaneous.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'routers/api/v1/miscellaneous.go') diff --git a/routers/api/v1/miscellaneous.go b/routers/api/v1/miscellaneous.go index b3291fc1..0da5dc15 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), -- cgit v1.2.3