3 ms·
Good in principle, but bad in the implementation. From their Markdown Annotations specs [0], the authorship is recorded in a quasi-YAML block at the end of the
by firexcy 3y ago
Good in principle, but bad in the implementation.
From their Markdown Annotations specs [0], the authorship is recorded in a quasi-YAML block at the end of the file, e.g.,—
Annotations: 0,95 SHA-256 1132bf5e376a605f5beed4b204456114
@Human: 0,20 33,4 45,6 62,4
&AI: 20,13 37,8 51,11 66,29
The format is bad for multiple reasons:
1. it doesn’t work with the existing de facto standard for markdown metadata, i.e., the YAML frontmatters; the markdown standard is already too fractured to have a new extension;
2. it messes with types by using YAML strings for arrays and integers;
3. it’s inefficient — any change in the file would demand iterating through all recorded ranges and updating the offsets.
I’d prefer it to adopt the YAML frontmatters:
authorship:
authors:
- {id: 0, name: Human, hash: xxxxxxxx}
- {id: 1, name: AI}
ranges: # adding ids to help resolve potential conflicts
- {id: 0, author: Human, begin: 0, len: 20}
- {id: 1, author: AI, begin: 20, len: 13}
[0]: https://github.com/iainc/Markdown-Annotations https://github.com/iainc/Markdown-Annotations