mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
Add roles and versions as new dimensions (in addition to language)
See the main issue #13776 for details. Fixes #519 Fixes #13680 Fixes #13663 Fixes #13776 Fixes #13855 Fixes #13648 Fixes #13996 Fixes #14001 Fixes #14031 Fixes #13818 Fixes #13196
This commit is contained in:
@@ -24,8 +24,8 @@ import (
|
||||
|
||||
"golang.org/x/net/html"
|
||||
|
||||
"github.com/gohugoio/hugo/common/hstrings"
|
||||
"github.com/gohugoio/hugo/config"
|
||||
"github.com/gohugoio/hugo/helpers"
|
||||
)
|
||||
|
||||
const eof = -1
|
||||
@@ -77,9 +77,9 @@ func (h *HTMLElements) Merge(other HTMLElements) {
|
||||
h.Classes = append(h.Classes, other.Classes...)
|
||||
h.IDs = append(h.IDs, other.IDs...)
|
||||
|
||||
h.Tags = helpers.UniqueStringsReuse(h.Tags)
|
||||
h.Classes = helpers.UniqueStringsReuse(h.Classes)
|
||||
h.IDs = helpers.UniqueStringsReuse(h.IDs)
|
||||
h.Tags = hstrings.UniqueStringsReuse(h.Tags)
|
||||
h.Classes = hstrings.UniqueStringsReuse(h.Classes)
|
||||
h.IDs = hstrings.UniqueStringsReuse(h.IDs)
|
||||
}
|
||||
|
||||
func (h *HTMLElements) Sort() {
|
||||
@@ -122,9 +122,9 @@ func (c *htmlElementsCollector) getHTMLElements() HTMLElements {
|
||||
}
|
||||
}
|
||||
|
||||
classes = helpers.UniqueStringsSorted(classes)
|
||||
ids = helpers.UniqueStringsSorted(ids)
|
||||
tags = helpers.UniqueStringsSorted(tags)
|
||||
classes = hstrings.UniqueStringsSorted(classes)
|
||||
ids = hstrings.UniqueStringsSorted(ids)
|
||||
tags = hstrings.UniqueStringsSorted(tags)
|
||||
|
||||
els := HTMLElements{
|
||||
Classes: classes,
|
||||
|
||||
Reference in New Issue
Block a user