From 8af8682f7d42c1cfd6c567ce9400337ab3cd6ecd Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 23 Mar 2024 14:47:15 +0100 Subject: [PATCH 1/2] modules/markup/markdown/ast: Drop IsColorPreview The function isn't used anywhere, it's dead code. Remove it. Partially cherry picked from commit 46c3f3b9e81e25c3ed08ba6c5bfeb8802b3ba1fd. Signed-off-by: Gergely Nagy --- modules/markup/markdown/ast.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/modules/markup/markdown/ast.go b/modules/markup/markdown/ast.go index 72d32600f5..7f0ac6a92c 100644 --- a/modules/markup/markdown/ast.go +++ b/modules/markup/markdown/ast.go @@ -174,10 +174,3 @@ func NewColorPreview(color []byte) *ColorPreview { Color: color, } } - -// IsColorPreview returns true if the given node implements the ColorPreview interface, -// otherwise false. -func IsColorPreview(node ast.Node) bool { - _, ok := node.(*ColorPreview) - return ok -} From 50fb2ac47fa163677b09b6ff223f6cc9b1480ae1 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 23 Mar 2024 15:52:24 +0100 Subject: [PATCH 2/2] [DEADCODE] update Signed-off-by: Gergely Nagy --- .deadcode-out | 1 - 1 file changed, 1 deletion(-) diff --git a/.deadcode-out b/.deadcode-out index 1b33525a6d..e8d3b813f1 100644 --- a/.deadcode-out +++ b/.deadcode-out @@ -222,7 +222,6 @@ package "code.gitea.io/gitea/modules/markup/markdown" func IsSummary func IsTaskCheckBoxListItem func IsIcon - func IsColorPreview func RenderRawString package "code.gitea.io/gitea/modules/markup/markdown/math"