tpl: Fix it so embedded render-codeblock-goat is used even if custom render-codeblock exists

Fixes #13595
This commit is contained in:
Bjørn Erik Pedersen
2025-04-12 12:02:33 +02:00
parent 53221f88ca
commit c8710625b7
3 changed files with 100 additions and 7 deletions

View File

@@ -208,12 +208,9 @@ func (this TemplateDescriptor) doCompare(category Category, isEmbedded bool, oth
w.w1 += weightVariant1
}
if other.Variant2 != "" && other.Variant2 == this.Variant2 {
if other.Variant1 != "" && other.Variant2 == this.Variant2 {
w.w1 += weightVariant2
}
if other.Variant2 != "" && this.Variant2 == "" {
w.w1--
}
return w
}