tpl/transform: Add CanHighlight

Closes #9573
This commit is contained in:
Bjørn Erik Pedersen 2022-02-27 17:09:11 +01:00
parent cff14144a6
commit 39261b689e
2 changed files with 16 additions and 0 deletions

View file

@ -95,6 +95,16 @@ func TestHighlight(t *testing.T) {
}
}
func TestCanHighlight(t *testing.T) {
t.Parallel()
c := qt.New(t)
ns := &transform.Namespace{}
c.Assert(ns.CanHighlight("go"), qt.Equals, true)
c.Assert(ns.CanHighlight("foo"), qt.Equals, false)
}
func TestHTMLEscape(t *testing.T) {
t.Parallel()
b := hugolib.NewIntegrationTestBuilder(