Repository: gohugoio/hugo (language: go)

Issue:
Chroma: YAML indentation sometimes doubled
<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Hugo are you using (`hugo version`)?

<pre>
$ hugo version
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended linux/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio
</pre>

### Does this issue reproduce with the latest release?

yes

### Steps to reproduce

1. Create a yaml code block (or highlight shortcode)
2. Include a single-line block scalar in your YAML
3. See that the block scalar content is indented twice as far in the rendered output, compared to the input.

### Example

<pre>
---
title: "Post"
date: 2023-02-02T08:34:04-07:00
draft: false
---

```yaml
one:
  two:
    three: |
      four
    five: |
      six
      seven
```

{{< highlight yaml >}}
one:
  two:
    three: |
      four
    five: |
      six
      seven
{{< /highlight >}}
</pre>

![image](https://user-images.githubusercontent.com/4226764/216715957-2176a8c6-c746-4bcd-a87d-29ffef9aad6a.png)

### Background

As far as I can tell, the problem is not present upstream in https://github.com/alecthomas/chroma

<pre>
$ go version -m ~/bin/hugo | grep -i chroma
        dep     github.com/alecthomas/chroma/v2 v2.4.0  h1:Loe2ZjT5x3q1bcWwemqyqEi8p11/IV/ncFCeLYDpWC4=
</pre>


![image](https://user-images.githubusercontent.com/4226764/216716097-33d31c5f-fa30-4355-bc5f-714dad32ee52.png)



Discussion / hints:
This is a Chroma issue, and it was resolved with https://github.com/alecthomas/chroma/commit/5ca7345671490cbc9dfd3e122a4dfc617e977992. That commit occurred after the release of 2.4.0. We'll get the update when the author rolls another release.
Ah, thanks! Sorry for not digging deep enough upstream!

Fix patch:
diff --git a/go.mod b/go.mod
index 85f175990ff..09e27ab6601 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.4.0
+	github.com/alecthomas/chroma/v2 v2.5.0
 	github.com/armon/go-radix v1.0.0
 	github.com/aws/aws-sdk-go v1.44.151
 	github.com/bep/clock v0.3.0
diff --git a/go.sum b/go.sum
index 976e3947745..823eb9ca553 100644
--- a/go.sum
+++ b/go.sum
@@ -491,10 +491,10 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX
 github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
 github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
-github.com/alecthomas/assert/v2 v2.2.0 h1:f6L/b7KE2bfA+9O4FL3CM/xJccDEwPVYd5fALBiuwvw=
-github.com/alecthomas/chroma/v2 v2.4.0 h1:Loe2ZjT5x3q1bcWwemqyqEi8p11/IV/ncFCeLYDpWC4=
-github.com/alecthomas/chroma/v2 v2.4.0/go.mod h1:6kHzqF5O6FUSJzBXW7fXELjb+e+7OXW4UpoPqMO7IBQ=
-github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE=
+github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink=
+github.com/alecthomas/chroma/v2 v2.5.0 h1:CQCdj1BiBV17sD4Bd32b/Bzuiq/EqoNTrnIhyQAZ+Rk=
+github.com/alecthomas/chroma/v2 v2.5.0/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw=
+github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
 github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
 github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=


Test patch: