aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/markdown/markdown.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/markdown/markdown.go')
-rw-r--r--modules/markup/markdown/markdown.go21
1 files changed, 11 insertions, 10 deletions
diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go
index 5ce36a1d16..b45b9c8b8a 100644
--- a/modules/markup/markdown/markdown.go
+++ b/modules/markup/markdown/markdown.go
@@ -28,12 +28,16 @@ import (
"github.com/yuin/goldmark/util"
)
-var converter goldmark.Markdown
-var once = sync.Once{}
+var (
+ converter goldmark.Markdown
+ once = sync.Once{}
+)
-var urlPrefixKey = parser.NewContextKey()
-var isWikiKey = parser.NewContextKey()
-var renderMetasKey = parser.NewContextKey()
+var (
+ urlPrefixKey = parser.NewContextKey()
+ isWikiKey = parser.NewContextKey()
+ renderMetasKey = parser.NewContextKey()
+)
type limitWriter struct {
w io.Writer
@@ -134,7 +138,6 @@ func actualRender(ctx *markup.RenderContext, input io.Reader, output io.Writer)
util.Prioritized(NewHTMLRenderer(), 10),
),
)
-
})
lw := &limitWriter{
@@ -190,10 +193,8 @@ func render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error
return actualRender(ctx, input, output)
}
-var (
- // MarkupName describes markup's name
- MarkupName = "markdown"
-)
+// MarkupName describes markup's name
+var MarkupName = "markdown"
func init() {
markup.RegisterRenderer(Renderer{})