Chroma highlighting yaml issue

I am having an issue using code fences in markdown files. Specifically, I want to write:

```yaml
      logs:
        - type: file
          path: <TAG>/text/text.log
          service: <SERVICE_NAME>  
          source: file
        - type: file
          path: <TAG>/text/text.log
          service:  <SERVICE_NAME>  
          source: file
    ```

but the greater than characters cause an issue:

is there any solution to escape the greater than character or something? Not sure how to resolve this…

using hugo version 0.55.3

Thanks.

Wrap it in double quotes, which is still valid YAML.

service: "<SERVICE_NAME>"

I then get:

Would rather not have the quotes rendered…

I see. In that case it may be worth filing an issue: https://github.com/alecthomas/chroma/issues

1 Like