From 272484f8bfab97dbadad49a638a3e4b6af499f15 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Tue, 24 Oct 2023 03:04:13 -0700 Subject: markdown: Pass emoji codes to yuin/goldmark-emoji Removes emoji code conversion from the page and shortcode parsers. Emoji codes in markdown are now passed to Goldmark, where the goldmark-emoji extension converts them to decimal numeric character references. This disables emoji rendering for the alternate content formats: html, asciidoc, org, pandoc, and rst. Fixes #7332 Fixes #11587 Closes #11598 --- config/allconfig/configlanguage.go | 4 ++++ config/configProvider.go | 1 + 2 files changed, 5 insertions(+) (limited to 'config') diff --git a/config/allconfig/configlanguage.go b/config/allconfig/configlanguage.go index 27ba00d82..2c5a116f4 100644 --- a/config/allconfig/configlanguage.go +++ b/config/allconfig/configlanguage.go @@ -228,3 +228,7 @@ func (c ConfigLanguage) PaginatePath() string { func (c ConfigLanguage) StaticDirs() []string { return c.config.staticDirs() } + +func (c ConfigLanguage) EnableEmoji() bool { + return c.config.EnableEmoji +} diff --git a/config/configProvider.go b/config/configProvider.go index 946830056..8e2ab0334 100644 --- a/config/configProvider.go +++ b/config/configProvider.go @@ -66,6 +66,7 @@ type AllProvider interface { StaticDirs() []string IgnoredErrors() map[string]bool WorkingDir() string + EnableEmoji() bool } // Provider provides the configuration settings for Hugo. -- cgit v1.2.3