summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-10-25 11:31:01 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-10-26 09:20:56 +0200
commitc4a530f104f2b0d1dd82211b77b603a07db7c181 (patch)
treee357e0e41856d8978140a388a337a349d58b594b /hugolib
parent272484f8bfab97dbadad49a638a3e4b6af499f15 (diff)
Remove rest of the now unused emoji code
See #11598
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/page.go5
-rw-r--r--hugolib/shortcode.go14
2 files changed, 5 insertions, 14 deletions
diff --git a/hugolib/page.go b/hugolib/page.go
index 48f4c9d2b..2ea936af2 100644
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -631,7 +631,6 @@ func (p *pageState) wrapError(err error) error {
}
return herrors.NewFileErrorFromFile(err, filename, p.s.SourceSpec.Fs.Source, lineMatcher)
-
}
func (p *pageState) getContentConverter() converter.Converter {
@@ -674,7 +673,6 @@ func (p *pageState) mapContentForResult(
markup string,
withFrontMatter func(map[string]any) error,
) error {
-
iter := result.Iterator()
fail := func(err error, i pageparser.Item) error {
@@ -792,9 +790,6 @@ Loop:
s.shortcodes = append(s.shortcodes, currShortcode)
rn.AddShortcode(currShortcode)
-
- case it.Type == pageparser.TypeEmoji:
- rn.AddBytes(it)
case it.IsEOF():
break Loop
case it.IsError():
diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go
index 8edfab118..c10896bef 100644
--- a/hugolib/shortcode.go
+++ b/hugolib/shortcode.go
@@ -16,6 +16,7 @@ package hugolib
import (
"bytes"
"context"
+ "errors"
"fmt"
"html/template"
"path"
@@ -26,8 +27,6 @@ import (
"strings"
"sync"
- "errors"
-
"github.com/gohugoio/hugo/common/herrors"
"github.com/gohugoio/hugo/parser/pageparser"
@@ -312,8 +311,8 @@ func prepareShortcode(
tplVariants tpl.TemplateVariants,
sc *shortcode,
parent *ShortcodeWithPage,
- p *pageState) (shortcodeRenderer, error) {
-
+ p *pageState,
+) (shortcodeRenderer, error) {
toParseErr := func(err error) error {
return p.parseError(fmt.Errorf("failed to render shortcode %q: %w", sc.name, err), p.source.parsed.Input(), sc.pos)
}
@@ -332,7 +331,6 @@ func prepareShortcode(
}
return fn, nil
-
}
func doRenderShortcode(
@@ -342,7 +340,8 @@ func doRenderShortcode(
tplVariants tpl.TemplateVariants,
sc *shortcode,
parent *ShortcodeWithPage,
- p *pageState) (shortcodeRenderer, error) {
+ p *pageState,
+) (shortcodeRenderer, error) {
var tmpl tpl.Template
// Tracks whether this shortcode or any of its children has template variations
@@ -501,7 +500,6 @@ func (s *shortcodeHandler) transferNames(in *shortcodeHandler) {
for k := range in.nameSet {
s.nameSet[k] = true
}
-
}
func (s *shortcodeHandler) hasName(name string) bool {
@@ -629,8 +627,6 @@ Loop:
return sc, nil
case currItem.IsText():
sc.inner = append(sc.inner, currItem.ValStr(source))
- case currItem.Type == pageparser.TypeEmoji:
- sc.inner = append(sc.inner, currItem.ValStr(source))
case currItem.IsShortcodeName():
sc.name = currItem.ValStr(source)