diff --git a/README.md b/README.md index 1ac4748..cef034c 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ goldmark-emoji [godev-image]: https://pkg.go.dev/badge/github.com/yuin/goldmark-emoji [godev-url]: https://pkg.go.dev/github.com/yuin/goldmark-emoji -goldmark-emoji is an extension for the [goldmark](http://github.com/yuin/goldmark) +goldmark-emoji is an extension for the [goldmark](http://github.com/yuin/goldmark) that parses `:joy:` style emojis. Installation -------------------- -``` +```sh go get github.com/yuin/goldmark-emoji ``` @@ -59,13 +59,12 @@ Options for the extension | `WithTwemojiTemplate` | Twemoji img tag printf template | | `WithRendererFunc` | renders by a go function | - - License -------------------- + MIT Author -------------------- -Yusuke Inuzuka +Yusuke Inuzuka diff --git a/emoji.go b/emoji.go index 46f1ec3..abad1de 100644 --- a/emoji.go +++ b/emoji.go @@ -109,7 +109,7 @@ type RendererConfig struct { } // DefaultTwemojiTemplate is a default value for RendererConfig.TwemojiTemplate. -const DefaultTwemojiTemplate = `%[1]s` +const DefaultTwemojiTemplate = `%[1]s` // SetOption implements renderer.SetOptioner. func (c *RendererConfig) SetOption(name renderer.OptionName, value interface{}) { diff --git a/emoji_test.go b/emoji_test.go index 14618a4..e94da3e 100644 --- a/emoji_test.go +++ b/emoji_test.go @@ -49,7 +49,7 @@ func TestOptions(t *testing.T) { Lucky :joy: `), Expected: strings.TrimSpace(` -

Lucky face with tears of joy

+

Lucky face with tears of joy

`), }, t) @@ -72,7 +72,7 @@ func TestOptions(t *testing.T) { Lucky :joy: `), Expected: strings.TrimSpace(` -

Lucky face with tears of joy

+

Lucky face with tears of joy

`), }, t) @@ -80,7 +80,7 @@ func TestOptions(t *testing.T) { goldmark.WithExtensions( New( WithRenderingMethod(Twemoji), - WithTwemojiTemplate(`%[1]s`), + WithTwemojiTemplate(`%[1]s`), ), ), ) @@ -93,7 +93,7 @@ func TestOptions(t *testing.T) { Lucky :joy: `), Expected: strings.TrimSpace(` -

Lucky face with tears of joy

+

Lucky face with tears of joy

`), }, t)