margin
margin copied to clipboard
Store annotations as objects
Originally raised by @mtsknn in https://github.com/gamburg/margin/issues/11#issuecomment-627576288
As @burlesona put it:
Item 1 [a note]
Item 2 [tag: foo]
Item 3
[tag: red]
[tag: blue]
In JSON these annotations would come out as:
// Item 1 Annotations:
[{ "value": "a note" }]
// Item 2 Annotations:
[{ "index": "tag", "value": "foo" }]
// Item 3 Annotations
[{ "index": "tag", "value": "red" }, { "index": "tag", "value": "blue" }]
And index
could instead be called type
or key
. The current documentation uses the term type
, and there's a separate section called "Indexes":
An index is any item that parents an annotation of type `filter`