17
--- #File A
  - Lunch: &01
        - Chicken
        - Rice
        - Sallad
...

--- #File B
  - Monday: *01
  - Tuesday: *01
...

For example File A is in C:drive in my PC and File B is in D:drive.

How can I export the anchors Using YAML?

John Smith
  • 7,243
  • 6
  • 49
  • 61
user2790799
  • 171
  • 1
  • 3
  • This question is pretty similar to [this one](https://stackoverflow.com/a/76677480/20269772). I recommend having a look at it – arthur simas Jul 13 '23 at 08:44

1 Answers1

15

You can't share anchors/aliases between documents; Chapter 9.1 of the YAML 1.2 spec explicitly states that each document is completely independent.

MrBackend
  • 597
  • 3
  • 15