From 5d52f88c9cff60c7920a8246dc3e56387ba74a1c Mon Sep 17 00:00:00 2001 From: Gusted Date: Fri, 31 Jan 2025 14:25:33 +0100 Subject: [PATCH] chore: Remove `WithXXXParser` - Introduced in 88c2e2436001c868c2583950b5f9eb0516424b7d and removed in the same commit. No usage. --- .deadcode-out | 4 ---- modules/markup/markdown/math/math.go | 22 ---------------------- 2 files changed, 26 deletions(-) diff --git a/.deadcode-out b/.deadcode-out index 0b567fffee..b420bf15dd 100644 --- a/.deadcode-out +++ b/.deadcode-out @@ -144,10 +144,6 @@ code.gitea.io/gitea/modules/markup/console code.gitea.io/gitea/modules/markup/markdown RenderRawString -code.gitea.io/gitea/modules/markup/markdown/math - WithInlineDollarParser - WithBlockDollarParser - code.gitea.io/gitea/modules/markup/mdstripper stripRenderer.AddOptions StripMarkdown diff --git a/modules/markup/markdown/math/math.go b/modules/markup/markdown/math/math.go index 3d9f376bc6..4126dc9ad6 100644 --- a/modules/markup/markdown/math/math.go +++ b/modules/markup/markdown/math/math.go @@ -39,28 +39,6 @@ func Enabled(enable ...bool) Option { }) } -// WithInlineDollarParser enables or disables the parsing of $...$ -func WithInlineDollarParser(enable ...bool) Option { - value := true - if len(enable) > 0 { - value = enable[0] - } - return extensionFunc(func(e *Extension) { - e.parseDollarInline = value - }) -} - -// WithBlockDollarParser enables or disables the parsing of $$...$$ -func WithBlockDollarParser(enable ...bool) Option { - value := true - if len(enable) > 0 { - value = enable[0] - } - return extensionFunc(func(e *Extension) { - e.parseDollarBlock = value - }) -} - // Math represents a math extension with default rendered delimiters var Math = &Extension{ enabled: true,