From 9ae80a6173132c54fb0fb9f094b3e472a10e1f3f Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Thu, 13 Jan 2022 11:27:16 +0800 Subject: chore: rename few consts to camel case (#6725) --- internal/markup/markdown.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/markup/markdown.go') diff --git a/internal/markup/markdown.go b/internal/markup/markdown.go index 0d4cdd2a..ab0b9cd2 100644 --- a/internal/markup/markdown.go +++ b/internal/markup/markdown.go @@ -105,7 +105,7 @@ func (r *MarkdownRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int) { } // ListItem defines how list items should be processed to produce corresponding HTML elements. -func (options *MarkdownRenderer) ListItem(out *bytes.Buffer, text []byte, flags int) { +func (r *MarkdownRenderer) ListItem(out *bytes.Buffer, text []byte, flags int) { // Detect procedures to draw checkboxes. switch { case bytes.HasPrefix(text, []byte("[ ] ")): @@ -113,7 +113,7 @@ func (options *MarkdownRenderer) ListItem(out *bytes.Buffer, text []byte, flags case bytes.HasPrefix(text, []byte("[x] ")): text = append([]byte(``), text[3:]...) } - options.Renderer.ListItem(out, text, flags) + r.Renderer.ListItem(out, text, flags) } // RawMarkdown renders content in Markdown syntax to HTML without handling special links. @@ -162,5 +162,5 @@ func RawMarkdown(body []byte, urlPrefix string) []byte { // Markdown takes a string or []byte and renders to HTML in Markdown syntax with special links. func Markdown(input interface{}, urlPrefix string, metas map[string]string) []byte { - return Render(MARKDOWN, input, urlPrefix, metas) + return Render(TypeMarkdown, input, urlPrefix, metas) } -- cgit v1.2.3