diff options
author | Joe Chen <jc@unknwon.io> | 2022-01-13 11:27:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 11:27:16 +0800 |
commit | 9ae80a6173132c54fb0fb9f094b3e472a10e1f3f (patch) | |
tree | 4ba9fd4de2fbba3a986a772e337ce71be9845636 /internal/markup/markdown.go | |
parent | c8476b1c2e5dc8e430713722daa0bc4ba5e07103 (diff) |
chore: rename few consts to camel case (#6725)
Diffstat (limited to 'internal/markup/markdown.go')
-rw-r--r-- | internal/markup/markdown.go | 6 |
1 files changed, 3 insertions, 3 deletions
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(`<input type="checkbox" disabled="" checked="" />`), 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) } |