-
- Notifications
You must be signed in to change notification settings - Fork 33.8k
Open
Description
What problem does this feature solve?
Errors raised by the html parser (options.warn in the code) don't register the location of the error.
With the location it will be much easier to debug.
For example if I forget to close an HTML tag, the compiler will complain and tell me the name of the tag. However I will have no idea where the opening tag is located. For moderately big files it's quite impractical.
What does the proposed API look like?
In parseHTML we could add a property in options that will include the line at which the HTML is included in the .vue file. We can use this to offset the location before printing it.
As for getting the locations themselves I have no idea how to proceed. If someone can give me some pointers I may submit a pull request.
dennythecoder, KaelWD, fabiosussetto, ndabAP, blackst0ne and 4 more