executablebooks / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
172 stars 50 forks source link

Errors in `include` files are reported from the wrong file #1346

Open fwkoch opened 1 week ago

fwkoch commented 1 week ago

Description

If file A includes file B but there is an error in file B, the warning/error logged to the console will give the name of file A but the line number from file B

Proposed solution

The vfile keeps track of current file for error reporting - we probably just need a new vfile with the correct filename when we build include files.