%YAML 1.2
---
# Directives must precede the document they apply to, and a directives-end marker (---) is
# required after them. A second document may declare its own directives after an explicit
# document-end marker (...), which is what the second half of this stream does.
stage: build          # a trailing comment after a plain scalar
image: registry.example.invalid/ci/runner:1.4

# A comment on its own line, between two keys.

steps:
  # a comment inside a sequence
  - name: compile     # trailing comment on a mapping value
    run: make build
...
%YAML 1.2
%TAG !ci! tag:example.invalid,2026:ci/
---
job: !ci!Task
  name: unit-tests
  order: 2
...
