From 4cdfe27c8f5faf64bac4f5893107b7d92210e466 Mon Sep 17 00:00:00 2001 From: Gusted Date: Fri, 31 Jan 2025 14:23:10 +0100 Subject: [PATCH] chore: Remove `IsXXX` - Introduced in 812cfd0ad9bb and removed in the same commit. No usage. --- .deadcode-out | 4 ---- modules/markup/markdown/ast.go | 28 ---------------------------- 2 files changed, 32 deletions(-) diff --git a/.deadcode-out b/.deadcode-out index dcae3a4367..0b567fffee 100644 --- a/.deadcode-out +++ b/.deadcode-out @@ -142,10 +142,6 @@ code.gitea.io/gitea/modules/markup/console RenderString code.gitea.io/gitea/modules/markup/markdown - IsDetails - IsSummary - IsTaskCheckBoxListItem - IsIcon RenderRawString code.gitea.io/gitea/modules/markup/markdown/math diff --git a/modules/markup/markdown/ast.go b/modules/markup/markdown/ast.go index 7f0ac6a92c..c2fbbe6692 100644 --- a/modules/markup/markdown/ast.go +++ b/modules/markup/markdown/ast.go @@ -34,13 +34,6 @@ func NewDetails() *Details { } } -// IsDetails returns true if the given node implements the Details interface, -// otherwise false. -func IsDetails(node ast.Node) bool { - _, ok := node.(*Details) - return ok -} - // Summary is a block that contains the summary of details block type Summary struct { ast.BaseBlock @@ -66,13 +59,6 @@ func NewSummary() *Summary { } } -// IsSummary returns true if the given node implements the Summary interface, -// otherwise false. -func IsSummary(node ast.Node) bool { - _, ok := node.(*Summary) - return ok -} - // TaskCheckBoxListItem is a block that represents a list item of a markdown block with a checkbox type TaskCheckBoxListItem struct { *ast.ListItem @@ -103,13 +89,6 @@ func NewTaskCheckBoxListItem(listItem *ast.ListItem) *TaskCheckBoxListItem { } } -// IsTaskCheckBoxListItem returns true if the given node implements the TaskCheckBoxListItem interface, -// otherwise false. -func IsTaskCheckBoxListItem(node ast.Node) bool { - _, ok := node.(*TaskCheckBoxListItem) - return ok -} - // Icon is an inline for a fomantic icon type Icon struct { ast.BaseInline @@ -139,13 +118,6 @@ func NewIcon(name string) *Icon { } } -// IsIcon returns true if the given node implements the Icon interface, -// otherwise false. -func IsIcon(node ast.Node) bool { - _, ok := node.(*Icon) - return ok -} - // ColorPreview is an inline for a color preview type ColorPreview struct { ast.BaseInline