diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-01-29 02:41:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-29 02:41:31 +0800 |
commit | 2f4cc5480e77b8802265aaa5bbf24c1573a0523d (patch) | |
tree | 17ff5e4009130ff06fd61ffe14a432509f07ac5f /internal/route | |
parent | 5e6c3b9d0e9a06764079bc07c0419b1ebf9183eb (diff) |
api/misc/markdown: remove Mode option (#5910)
We already have a separate `/markdown/raw` API, remove redundant functionality here.
Diffstat (limited to 'internal/route')
-rw-r--r-- | internal/route/api/v1/misc/markdown.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/internal/route/api/v1/misc/markdown.go b/internal/route/api/v1/misc/markdown.go index cd0ba905..10889d3b 100644 --- a/internal/route/api/v1/misc/markdown.go +++ b/internal/route/api/v1/misc/markdown.go @@ -24,14 +24,7 @@ func Markdown(c *context.APIContext, form api.MarkdownOption) { return } - var md []byte - switch form.Mode { - case "gfm": - md = markup.Markdown([]byte(form.Text), form.Context, nil) - default: - md = markup.SanitizeBytes(markup.RawMarkdown([]byte(form.Text), "")) - } - _, _ = c.Write(md) + _, _ = c.Write(markup.Markdown([]byte(form.Text), form.Context, nil)) } func MarkdownRaw(c *context.APIContext) { |