mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
@@ -213,16 +213,6 @@ func (d decl) indexOfReplacementStart(idents []string) int {
|
||||
// .Data.Params.someKey
|
||||
return -1
|
||||
}
|
||||
if !d.isKeyword(container) {
|
||||
// where $pages ".Params.toc_hide" "!=" true
|
||||
return -1
|
||||
}
|
||||
}
|
||||
if i < len(resolvedIdents)-1 {
|
||||
next := resolvedIdents[i+1]
|
||||
if !d.isKeyword(next) {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
paramFound = true
|
||||
@@ -298,6 +288,11 @@ func (d decl) resolveVariables(idents []string) ([]string, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
if !d.isKeyword(replacement) {
|
||||
// This can not be .Site.Params etc.
|
||||
return nil, false
|
||||
}
|
||||
|
||||
replacement = strings.TrimPrefix(replacement, ".")
|
||||
|
||||
if replacement == "" {
|
||||
|
Reference in New Issue
Block a user