From c9b1a4b08b7611deb925b8e575ff77f1c565071d Mon Sep 17 00:00:00 2001 From: Luke Hagar Date: Mon, 10 Nov 2025 18:21:01 +0000 Subject: [PATCH] Update locEnd implementation in OpenAPI parser to handle content length more robustly --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 9a86c76..9830078 100644 --- a/src/index.ts +++ b/src/index.ts @@ -328,7 +328,7 @@ export const parsers: Record = { }, astFormat: "openapi-ast", locStart: (node: OpenAPINode) => 0, - locEnd: (_node: OpenAPINode, text: string) => text.length, + locEnd: (node: OpenAPINode) => node.content?.length || 0, }, };