Modify ↓
Ticket #37 (closed defect: invalid)
Cross referenced aliases unsupported ?
| Reported by: | Pwipwi | Owned by: | xi |
|---|---|---|---|
| Priority: | normal | Component: | pyyaml |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Hi, the following doesn't work :
- &element1 stuff: "Hey !" link: *element2 # this causes trouble - &element2 stuff: "Ho !" link: *element1
Is it normal, or is it just unsupported for now ? It would be nice to have it :)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

In YAML, anchors (like &element2) should be defined before the corresponding aliases (like *element2) can be used.
To fix your example, you need to rewrite it in the form:
- &element1 stuff: "Hey !" link: - &element2 stuff: "Ho !" link: *element1 - *element2Alternatively, you may consider changing the schema to something like: