X Tutup
Skip to content

Commit dafa2f6

Browse files
committed
Enable emoji in markdown
1 parent 21c4f14 commit dafa2f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/markdown/markdown.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func render(text string, opts RenderOpts) (string, error) {
4343
func Render(text, style string) (string, error) {
4444
opts := RenderOpts{
4545
glamour.WithStylePath(style),
46+
glamour.WithEmoji(),
4647
}
4748

4849
return render(text, opts)
@@ -51,6 +52,7 @@ func Render(text, style string) (string, error) {
5152
func RenderWithOpts(text, style string, opts RenderOpts) (string, error) {
5253
defaultOpts := RenderOpts{
5354
glamour.WithStylePath(style),
55+
glamour.WithEmoji(),
5456
}
5557
opts = append(defaultOpts, opts...)
5658

@@ -60,6 +62,7 @@ func RenderWithOpts(text, style string, opts RenderOpts) (string, error) {
6062
func RenderWithBaseURL(text, style, baseURL string) (string, error) {
6163
opts := RenderOpts{
6264
glamour.WithStylePath(style),
65+
glamour.WithEmoji(),
6366
glamour.WithBaseURL(baseURL),
6467
}
6568

@@ -69,6 +72,7 @@ func RenderWithBaseURL(text, style, baseURL string) (string, error) {
6972
func RenderWithWrap(text, style string, wrap int) (string, error) {
7073
opts := RenderOpts{
7174
glamour.WithStylePath(style),
75+
glamour.WithEmoji(),
7276
glamour.WithWordWrap(wrap),
7377
}
7478

0 commit comments

Comments
 (0)
X Tutup