mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
tpl: Sync go_templates for Go 1.18
Using Go tag go1.18 4aa1efed4853ea067d665a952eee77c52faac774 Updates #9677
This commit is contained in:
@@ -143,12 +143,12 @@ func attrType(name string) contentType {
|
||||
// widely applied.
|
||||
// Treat data-action as URL below.
|
||||
name = name[5:]
|
||||
} else if colon := strings.IndexRune(name, ':'); colon != -1 {
|
||||
if name[:colon] == "xmlns" {
|
||||
} else if prefix, short, ok := strings.Cut(name, ":"); ok {
|
||||
if prefix == "xmlns" {
|
||||
return contentTypeURL
|
||||
}
|
||||
// Treat svg:href and xlink:href as href below.
|
||||
name = name[colon+1:]
|
||||
name = short
|
||||
}
|
||||
if t, ok := attrTypeMap[name]; ok {
|
||||
return t
|
||||
|
Reference in New Issue
Block a user