* Format parse5 @type {ParserError} to @type {RollupError}
(parserError: ParserError, id: string, html: string)
| 297 | * Format parse5 @type {ParserError} to @type {RollupError} |
| 298 | */ |
| 299 | function formatParseError(parserError: ParserError, id: string, html: string) { |
| 300 | const formattedError = { |
| 301 | code: parserError.code, |
| 302 | message: `parse5 error code ${parserError.code}`, |
| 303 | frame: generateCodeFrame( |
| 304 | html, |
| 305 | parserError.startOffset, |
| 306 | parserError.endOffset, |
| 307 | ), |
| 308 | loc: { |
| 309 | file: id, |
| 310 | line: parserError.startLine, |
| 311 | column: parserError.startCol, |
| 312 | }, |
| 313 | } satisfies RollupError |
| 314 | return formattedError |
| 315 | } |
| 316 | |
| 317 | function handleParseError( |
| 318 | parserError: ParserError, |
no test coverage detected