diff --git a/cmd/baseline.go b/cmd/baseline.go index bf55de7..d0ad914 100644 --- a/cmd/baseline.go +++ b/cmd/baseline.go @@ -200,6 +200,7 @@ func (b *Baseline) Generate() error { "asLink": func(s string) string { return asLinkTemplateFunction(s) }, + "toLower": strings.ToLower, }).Parse(string(templateContent)) if err != nil { return fmt.Errorf("error parsing template: %w", err) diff --git a/cmd/template.md b/cmd/template.md index ca99e4d..b85f1fa 100644 --- a/cmd/template.md +++ b/cmd/template.md @@ -61,11 +61,11 @@ For more information on the project and to make contributions, visit the [GitHub ### {{ .ID }} -**Criterion:** {{ .CriterionText | addLinks }} - {{ if .ReplacedBy -}} -**Replaced By:** {{ .ReplacedBy }} -{{- else -}} +**Replaced By:** [{{ .ReplacedBy }}](#{{ .ReplacedBy | toLower }}) + +{{else -}} +**Criterion:** {{ .CriterionText | addLinks }} **Maturity Level:** {{ .MaturityLevel }}