ortfo / db

A readable, easy and enjoyable way to manage portfolio databases using directories and text files. Initially made for https://ewen.works.
https://ortfo.org/db
MIT License
2 stars 1 forks source link

Keep line numbers in description file to give better errors #72

Closed ewen-lbh closed 4 months ago

ewen-lbh commented 1 year ago

Maybe add like a private field sourceLineNumber in ContentBlock

For the YAML frontmatter, the best we can do is to just output the whole frontmatter (or else it would require a YAML parser that keeps the line number, and manual loading into a struct, a bit too overkill since most frontmatters won't be that long) Or maybe we could do a second parse phase in error handling that keeps line numbers just to get to the error (e.g. layout spec analysis)

ewen-lbh commented 4 months ago

/duplicate #56