summaryrefslogtreecommitdiffstats
path: root/markup/markup.go
diff options
context:
space:
mode:
Diffstat (limited to 'markup/markup.go')
-rw-r--r--markup/markup.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/markup/markup.go b/markup/markup.go
index ebd86f38f..835c7bbec 100644
--- a/markup/markup.go
+++ b/markup/markup.go
@@ -95,6 +95,7 @@ func NewConverterProvider(cfg converter.ProviderConfig) (ConverterProvider, erro
type ConverterProvider interface {
Get(name string) converter.Provider
+ IsGoldmark(name string) bool
// Default() converter.Provider
GetMarkupConfig() markup_config.Config
GetHighlighter() highlight.Highlighter
@@ -110,6 +111,11 @@ type converterRegistry struct {
config converter.ProviderConfig
}
+func (r *converterRegistry) IsGoldmark(name string) bool {
+ cp := r.Get(name)
+ return cp != nil && cp.Name() == "goldmark"
+}
+
func (r *converterRegistry) Get(name string) converter.Provider {
return r.converters[strings.ToLower(name)]
}