anchor - 跨 YAML 文件导出 anchor

标签 anchor yaml

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

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

例如,文件 A 位于我的 PC 的 C: 驱动器中,文件 B 位于 D: 驱动器中。

如何使用 YAML 导出 anchor ?

最佳答案

您不能在文档之间共享 anchor /别名; Chapter 9.1 of the YAML 1.2 spec明确指出每个文档是完全独立的。

关于anchor - 跨 YAML 文件导出 anchor ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18868292/

相关文章:

javascript - jQuery 滚动到 anchor 异常

jquery - anchor 标记在移动设备上不起作用

database - 有没有一种简单的方法来托管带有小数据文件的程序(尤其是在 Heroku 上)?

python - 将 json 转储到 yaml

c# - ASP.NET 添加一个 httphandler 来编辑下载的文件名

javascript - Rails link_to anchor 与远程 : true & method: :post

javascript - 如何使用 "fixed" header 使 anchor 标记直接指向页面上的正确位置?

python - 如何从大型 yaml 文件中获取部分数据?

amazon-web-services - Cloudformation - 在 map 中定义默认值

java - 在 Jackson 的单个文件中反序列化来自多个 YAML 文档的 POJO