Open gabro opened 2 years ago
I've tracked this down to https://github.com/microsoft/TypeScript-Website/blob/v2/packages/ts-twoslasher/src/index.ts#L722.
It seems the position
of errors is offset correctly, but the line
is not.
I'll attempt a fix there
Hello, thanks for this project, it looks really great and I'd love to use it for documenting a library I'm working on.
I've found an issue when trying to work with multiple files and error reporting. Here's a minimized example:
The error should be reported at line 3 of the second filename, but it's reported at line 3 of the entire snippet instead:
Here's a playground link with the example above https://shikijs.github.io/twoslash/playground?strict=false&resolveJsonModule=true#code/PTAEAEDMEsBsFMB2BDAtvAXKAzgV1QHQAu2AUPAB4AOA9gE5GiS6IDGR0NiO+AFMlkT4ARvDoAaUMMEixAShmpRdUAG9SoUHXhFcdbslABqKQG5SAX1KkQEGAhTosqZNETEyt8GLr1sWACYAZgAWAFZSaFRaBjUeVFALJl8EgCICYDxUVPNSLN4QyVSAdxoaKmxUuVMgA
As an aside, this was especially confusing because I had a
---cut---
before the second file, so the error simply wasn't rendered.