Repository: gohugoio/hugo
Pull request #11630 (2023-10-30 08:33:03)

build(deps): bump github.com/alecthomas/chroma/v2 from 2.9.1 to 2.10.0
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.9.1 to 2.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/alecthomas/chroma/releases">github.com/alecthomas/chroma/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.10.0</h2>
<h2>Changelog</h2>
<ul>
<li>810464a Update Java lexer (<a href="https://redirect.github.com/alecthomas/chroma/issues/873">#873</a>)</li>
<li>77e9146 Add file extensions to go_template lexer (<a href="https://redirect.github.com/alecthomas/chroma/issues/875">#875</a>)</li>
<li>b127e35 Make <code>tty_indexed.go</code> respond to <code>None</code> like <code>tty_truecolour.go</code> (<a href="https://redirect.github.com/alecthomas/chroma/issues/869">#869</a>)</li>
<li>9ae4dae Add <code>*.Dockerfile</code> to docker lexer (<a href="https://redirect.github.com/alecthomas/chroma/issues/868">#868</a>)</li>
<li>2fa6f14 Add PRQL to README (<a href="https://redirect.github.com/alecthomas/chroma/issues/863">#863</a>)</li>
<li>17597b6 Add PRQL language (<a href="https://redirect.github.com/alecthomas/chroma/issues/862">#862</a>)</li>
<li>7eb0305 lexers/r: Match keywords prior to functions (<a href="https://redirect.github.com/alecthomas/chroma/issues/860">#860</a>)</li>
<li>827bd93 lexers: add initial version of CUE lexer (<a href="https://redirect.github.com/alecthomas/chroma/issues/858">#858</a>)</li>
<li>9087c63 docs: note about Get() being slow due to file matching</li>
<li>ccd8d68 lexers: move to comparing bytes in tests (<a href="https://redirect.github.com/alecthomas/chroma/issues/856">#856</a>)</li>
<li>def00e9 chore: update issue templates</li>
<li>0b08639 lexers: support for nim GENERALIZED_TRIPLESTR_LIT (<a href="https://redirect.github.com/alecthomas/chroma/issues/853">#853</a>)</li>
<li>94d11ab Update Bicep grammar with recent additions (<a href="https://redirect.github.com/alecthomas/chroma/issues/850">#850</a>)</li>
<li>c64e1be add justfile filename to Makefile lexer (<a href="https://redirect.github.com/alecthomas/chroma/issues/852">#852</a>)</li>
<li>2b39461 Fix GDScript3 analyse regexes (<a href="https://redirect.github.com/alecthomas/chroma/issues/848">#848</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/alecthomas/chroma/commit/810464a509a74cb8f65940a28734f3b7e4cb94a2"><code>810464a</code></a> Update Java lexer (<a href="https://redirect.github.com/alecthomas/chroma/issues/873">#873</a>)</li>
<li><a href="https://github.com/alecthomas/chroma/commit/77e91469393cb76fcf61c61dd10288b836b5cc55"><code>77e9146</code></a> Add file extensions to go_template lexer (<a href="https://redirect.github.com/alecthomas/chroma/issues/875">#875</a>)</li>
<li><a href="https://github.com/alecthomas/chroma/commit/b127e3569cecb6023e71df532c6d9f371d945914"><code>b127e35</code></a> Make <code>tty_indexed.go</code> respond to <code>None</code> like <code>tty_truecolour.go</code> (<a href="https://redirect.github.com/alecthomas/chroma/issues/869">#869</a>)</li>
<li><a href="https://github.com/alecthomas/chroma/commit/9ae4daed01cdc32a292c4ba3901d83ec6dcff8c8"><code>9ae4dae</code></a> Add <code>*.Dockerfile</code> to docker lexer (<a href="https://redirect.github.com/alecthomas/chroma/issues/868">#868</a>)</li>
<li><a href="https://github.com/alecthomas/chroma/commit/2fa6f14bd6e7712bbea181fc4fcf71ee4b21163a"><code>2fa6f14</code></a> Add PRQL to README (<a href="https://redirect.github.com/alecthomas/chroma/issues/863">#863</a>)</li>
<li><a href="https://github.com/alecthomas/chroma/commit/17597b63b72ece94f4c0525f6a180a1561867e11"><code>17597b6</code></a> Add PRQL language (<a href="https://redirect.github.com/alecthomas/chroma/issues/862">#862</a>)</li>
<li><a href="https://github.com/alecthomas/chroma/commit/7eb0305e1b3b0d6af8aac735417a58c7322c932d"><code>7eb0305</code></a> lexers/r: Match keywords prior to functions (<a href="https://redirect.github.com/alecthomas/chroma/issues/860">#860</a>)</li>
<li><a href="https://github.com/alecthomas/chroma/commit/827bd93b8c86150f17f397246c232b796d880d8a"><code>827bd93</code></a> lexers: add initial version of CUE lexer (<a href="https://redirect.github.com/alecthomas/chroma/issues/858">#858</a>)</li>
<li><a href="https://github.com/alecthomas/chroma/commit/9087c632c4d442531b94565a00b4b120f9521f00"><code>9087c63</code></a> docs: note about Get() being slow due to file matching</li>
<li><a href="https://github.com/alecthomas/chroma/commit/ccd8d684951d421732a613db53ae4cae357bdd33"><code>ccd8d68</code></a> lexers: move to comparing bytes in tests (<a href="https://redirect.github.com/alecthomas/chroma/issues/856">#856</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/alecthomas/chroma/compare/v2.9.1...v2.10.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/alecthomas/chroma/v2&package-manager=go_modules&previous-version=2.9.1&new-version=2.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/go.mod b/go.mod
index b722d211c..5d1ccadc9 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/gohugoio/hugo
 require (
 	github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69
 	github.com/PuerkitoBio/purell v1.1.1
-	github.com/alecthomas/chroma/v2 v2.9.1
+	github.com/alecthomas/chroma/v2 v2.10.0
 	github.com/armon/go-radix v1.0.0
 	github.com/aws/aws-sdk-go v1.45.14
 	github.com/bep/clocks v0.5.0
diff --git a/go.sum b/go.sum
index 5974fd353..c8c477bad 100644
--- a/go.sum
+++ b/go.sum
@@ -71,8 +71,8 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
 github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink=
-github.com/alecthomas/chroma/v2 v2.9.1 h1:0O3lTQh9FxazJ4BYE/MOi/vDGuHn7B+6Bu902N2UZvU=
-github.com/alecthomas/chroma/v2 v2.9.1/go.mod h1:4TQu7gdfuPjSh76j78ietmqh9LiurGF0EpseFXdKMBw=
+github.com/alecthomas/chroma/v2 v2.10.0 h1:T2iQOCCt4pRmRMfL55gTodMtc7cU0y7lc1Jb8/mK/64=
+github.com/alecthomas/chroma/v2 v2.10.0/go.mod h1:4TQu7gdfuPjSh76j78ietmqh9LiurGF0EpseFXdKMBw=
 github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
diff --git a/hugolib/site_new.go b/hugolib/site_new.go
index 127b0e296..ac59e01c7 100644
--- a/hugolib/site_new.go
+++ b/hugolib/site_new.go
@@ -417,8 +417,8 @@ func (s *Site) Hugo() hugo.HugoInfo {
 }
 
 // Returns the BaseURL for this Site.
-func (s *Site) BaseURL() template.URL {
-	return template.URL(s.conf.C.BaseURL.WithPath)
+func (s *Site) BaseURL() string {
+	return s.conf.C.BaseURL.WithPath
 }
 
 // Returns the last modification date of the content.
diff --git a/resources/page/pagination.go b/resources/page/pagination.go
index a4605fa8e..9113b6062 100644
--- a/resources/page/pagination.go
+++ b/resources/page/pagination.go
@@ -16,7 +16,6 @@ package page
 import (
 	"errors"
 	"fmt"
-	"html/template"
 	"math"
 	"reflect"
 
@@ -71,8 +70,8 @@ func (p *Pager) PageNumber() int {
 }
 
 // URL returns the URL to the current page.
-func (p *Pager) URL() template.HTML {
-	return template.HTML(p.paginationURLFactory(p.PageNumber()))
+func (p *Pager) URL() string {
+	return p.paginationURLFactory(p.PageNumber())
 }
 
 // Pages returns the Pages on this page.
diff --git a/resources/page/site.go b/resources/page/site.go
index ba2759a06..0480ce674 100644
--- a/resources/page/site.go
+++ b/resources/page/site.go
@@ -82,7 +82,7 @@ type Site interface {
 	Hugo() hugo.HugoInfo
 
 	// Returns the BaseURL for this Site.
-	BaseURL() template.URL
+	BaseURL() string
 
 	// Returns a taxonomy map.
 	Taxonomies() TaxonomyList
@@ -172,6 +172,7 @@ func (s *siteWrapper) Social() map[string]string {
 func (s *siteWrapper) Author() map[string]interface{} {
 	return s.s.Author()
 }
+
 func (s *siteWrapper) Authors() AuthorList {
 	return AuthorList{}
 }
@@ -250,7 +251,7 @@ func (s *siteWrapper) Hugo() hugo.HugoInfo {
 	return s.s.Hugo()
 }
 
-func (s *siteWrapper) BaseURL() template.URL {
+func (s *siteWrapper) BaseURL() string {
 	return s.s.BaseURL()
 }
 
@@ -319,6 +320,7 @@ type testSite struct {
 func (s testSite) Author() map[string]interface{} {
 	return nil
 }
+
 func (s testSite) Authors() AuthorList {
 	return AuthorList{}
 }
@@ -421,7 +423,7 @@ func (t testSite) Taxonomies() TaxonomyList {
 	return nil
 }
 
-func (t testSite) BaseURL() template.URL {
+func (t testSite) BaseURL() string {
 	return ""
 }
 


Test patch:
diff --git a/resources/page/pagination_test.go b/resources/page/pagination_test.go
index 1e115d62b..487b36adb 100644
--- a/resources/page/pagination_test.go
+++ b/resources/page/pagination_test.go
@@ -16,7 +16,6 @@ package page
 import (
 	"context"
 	"fmt"
-	"html/template"
 	"testing"
 
 	qt "github.com/frankban/quicktest"
@@ -119,7 +118,7 @@ func doTestPages(t *testing.T, paginator *Paginator) {
 	c.Assert(paginator.TotalPages(), qt.Equals, 5)
 
 	first := paginatorPages[0]
-	c.Assert(first.URL(), qt.Equals, template.HTML("page/1/"))
+	c.Assert(first.URL(), qt.Equals, "page/1/")
 	c.Assert(first.First(), qt.Equals, first)
 	c.Assert(first.HasNext(), qt.Equals, true)
 	c.Assert(first.Next(), qt.Equals, paginatorPages[1])
@@ -134,7 +133,7 @@ func doTestPages(t *testing.T, paginator *Paginator) {
 	c.Assert(third.Prev(), qt.Equals, paginatorPages[1])
 
 	last := paginatorPages[4]
-	c.Assert(last.URL(), qt.Equals, template.HTML("page/5/"))
+	c.Assert(last.URL(), qt.Equals, "page/5/")
 	c.Assert(last.Last(), qt.Equals, last)
 	c.Assert(last.HasNext(), qt.Equals, false)
 	c.Assert(last.Next(), qt.IsNil)