What does ampersand mean in yaml

From razwiki
Revision as of 10:46, 30 November 2021 by Razzi (talk | contribs) (Created page with "It creates a yaml anchor, which allows you to duplicate / inherit content. <pre> # YAML also has a handy feature called 'anchors', which let you easily duplicate # content ac...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

It creates a yaml anchor, which allows you to duplicate / inherit content.

# YAML also has a handy feature called 'anchors', which let you easily duplicate
# content across your document. Both of these keys will have the same value:
anchored_content: &anchor_name This string will appear as the value of two keys.
other_anchor: *anchor_name

[1]