Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Rework and consolidate the page parser #5324
Working on #5284 I hit some hurdles when I wanted to show proper file/line context for errors in content files. The main problem is that the current parser splits front matter and the rest. There are currently some line number calculations in there, but it seems to be impossible to get exactly right in every situation.
The current "front matter" parser is also a little hard to read, and while considered stable and working, It is easy to read from the Git history that there have been corner cases that is simpler to avoid with a proper lexer.
So I suggest that:
There is also an obvious potential performance benefit in the "do it once" approach above.