aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJoe Mooring <[email protected]>2023-07-31 10:06:51 -0700
committerBjørn Erik Pedersen <[email protected]>2023-07-31 21:01:43 +0200
commit58da8554cb8e5a996f0a1429f23d4e9a59d61b77 (patch)
tree31f8011d03f4a2b7bd6b196683084bf4d7958286
parent92c1594372474fc9f7d2948ea0ae541ddace9a74 (diff)
downloadhugo-58da8554cb8e5a996f0a1429f23d4e9a59d61b77.tar.gz
hugo-58da8554cb8e5a996f0a1429f23d4e9a59d61b77.zip
deps: Fix Chroma dependency version
Fixes #11311
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--markup/highlight/integration_test.go32
3 files changed, 35 insertions, 3 deletions
diff --git a/go.mod b/go.mod
index 0d1b8f4fe..bf8a281b1 100644
--- a/go.mod
+++ b/go.mod
@@ -105,7 +105,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/sts v1.18.3 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
- github.com/dlclark/regexp2 v1.10.0 // indirect
+ github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/swag v0.19.5 // indirect
github.com/golang-jwt/jwt/v4 v4.0.0 // indirect
diff --git a/go.sum b/go.sum
index f68fbe52c..a3ff73f64 100644
--- a/go.sum
+++ b/go.sum
@@ -245,8 +245,8 @@ github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/
github.com/disintegration/gift v1.2.1 h1:Y005a1X4Z7Uc+0gLpSAsKhWi4qLtsdEcMIbbdvdZ6pc=
github.com/disintegration/gift v1.2.1/go.mod h1:Jh2i7f7Q2BM7Ezno3PhfezbR1xpUg9dUg3/RlKGr4HI=
github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE=
-github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0=
-github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
+github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
+github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
diff --git a/markup/highlight/integration_test.go b/markup/highlight/integration_test.go
index 2b4379bc2..ce6705f02 100644
--- a/markup/highlight/integration_test.go
+++ b/markup/highlight/integration_test.go
@@ -83,3 +83,35 @@ HighlightCodeBlock: Wrapped:{{ $result.Wrapped }}|Inner:{{ $result.Inner }}
"<code class=\"code-inline language-foo\">(message &#34;highlight me 3&#34;)\n</code>",
)
}
+
+// Issue #11311
+func TestIssue11311(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- config.toml --
+[markup.highlight]
+noClasses = false
+-- content/_index.md --
+---
+title: home
+---
+§§§go
+xəx := 0
+§§§
+-- layouts/index.html --
+{{ .Content }}
+`
+
+ b := hugolib.NewIntegrationTestBuilder(
+ hugolib.IntegrationTestConfig{
+ T: t,
+ TxtarString: files,
+ NeedsOsFS: false,
+ },
+ ).Build()
+
+ b.AssertFileContent("public/index.html", `
+ <span class="nx">xəx</span>
+ `)
+}