mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
all: Run modernize -fix ./...
This commit is contained in:
@@ -39,12 +39,12 @@ func HugoGenerator(ft transform.FromTo) error {
|
||||
}
|
||||
|
||||
head := "<head>"
|
||||
replace := []byte(fmt.Sprintf("%s\n\t%s", head, hugoGeneratorTag))
|
||||
replace := fmt.Appendf(nil, "%s\n\t%s", head, hugoGeneratorTag)
|
||||
newcontent := bytes.Replace(b, []byte(head), replace, 1)
|
||||
|
||||
if len(newcontent) == len(b) {
|
||||
head := "<HEAD>"
|
||||
replace := []byte(fmt.Sprintf("%s\n\t%s", head, hugoGeneratorTag))
|
||||
replace := fmt.Appendf(nil, "%s\n\t%s", head, hugoGeneratorTag)
|
||||
newcontent = bytes.Replace(b, []byte(head), replace, 1)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user