#2819·yq

Single-quoted multi-line flow scalar ending with a blank line loses indentation level on output

Author: taisphCreated Aug 18, 2026Updated Aug 18, 2026
Labelsbugv4

Describe the bug When the source YAML below is run through yq . it ends up with the last single-quote at the wrong/unexpected indentation level.

Version of yq: 4.53.2 4.53.3 Operating system: Ubuntu Linux Installed via: mise

Input Yaml Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less) source.yml:

yaml
paths:
  /v1/quack:
    get:
      description: '
        Get quacked.

        - Duck

        '

Command The command you ran:

yq . source.yml

Actual behaviour

yaml
paths:
  /v1/quack:
    get:
      description: ' Get quacked.

        - Duck

'

Expected behaviour

yaml
paths:
  /v1/quack:
    get:
      description: '
        Get quacked.

        - Duck

        '

Additional context Oddly, yq treats the output as valid and parsable even though some other tools flag is as incorrect. Also, using double-quoting does not exhibit this behaviour.