aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/html_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/html_test.go')
-rw-r--r--modules/markup/html_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go
index 4c3c2399f5..4cdd5798c8 100644
--- a/modules/markup/html_test.go
+++ b/modules/markup/html_test.go
@@ -464,3 +464,19 @@ func TestIssue16020(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, data, res.String())
}
+
+func BenchmarkEmojiPostprocess(b *testing.B) {
+ data := "🥰 "
+ for len(data) < 1<<16 {
+ data += data
+ }
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ var res strings.Builder
+ err := PostProcess(&RenderContext{
+ URLPrefix: "https://example.com",
+ Metas: localMetas,
+ }, strings.NewReader(data), &res)
+ assert.NoError(b, err)
+ }
+}