How do I add comments to a YAML webform? I would like to add comments to the Sourcecode of my webforms in YAML.
# comment (without quotes).
But when I save this, it automatically gets removed.
20_e_mailadres:
  '#type': email
  '#title': E-mailadres
# write a comment here
21_werkmail:
  '#type': email
  '#title': werk E-mailadres

How do I add comments to a YAML webform so they are kept when I save?
Context

Drupal 8.x
Webform module
YAML comments

Use-case

developer KoenC wishes to add comments to a YAML file and have those comments retained upon save

Problem

Per the YAML specification, comments are specified as &quot;throwaway&quot; artifacts.
This means that YAML commments are not required to be preserved by parsers that implement the YAML specification

Workaround

Metadata and comments can be added as separate YAML nodes (see e.g., https://stackoverflow.com/a/8565238/42223)