Thierry Lam Thierry Lam - 1 year ago 134
YAML Question

How do you do block comment in yaml?

Does anyone know how to comment a block of lines in yaml?

Answer Source

YAML supports inline comments, but does not support block comments.

From Wikipedia:

Comments begin with the number sign ( # ), can start anywhere on a line, and continue until the end of the line

Also from Wikipedia:

The syntax differences are subtle and seldom arise in practice: JSON allows extended charactersets like UTF-32, YAML requires a space after separators like comma, equals, and colon while JSON does not, and some non-standard implementations of JSON extend the grammar to include Javascript's /* ... */ comments. Handling such edge cases may require light pre-processing of the JSON before parsing as in-line YAML.

# If you want to write
# a block-commented Haiku
# you'll need three pound signs
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download