YAML Anchors/Aliases not working
I'm not even sure if this is an issue with urlwatch or not, but: I have a set of jobs that I need to apply the same set of filters to. So i tried this:
name: "test job 1"
url: "example.com"
filter: &testfilters
- filter1
- filter2
---
name:: "test job 2"
url: "example.net"
filter: *testfilters
but when I save I get the error found undefined alias 'testfilters'
Huh, I didn't even know those were a thing. We use yaml.SafeLoader (from PyYAML) for loading, can you try playing around with some other class in lib/urlwatch/storage.py?
I'm really sorry but I don't really understand what that means... I'm not really a programmer.
This is actually because they are different yaml documents. YAML does not allow anchors/references between documents, even if they are in the same file.
See: https://yaml.org/spec/1.2-old/spec.html#id2800132
Closing this as "works as intended" for now.