mirror of
https://github.com/LukeHagar/prettier-plugin-openapi.git
synced 2025-12-06 04:21:03 +00:00
Update locEnd implementation in OpenAPI parser to handle content length more robustly
This commit is contained in:
@@ -328,7 +328,7 @@ export const parsers: Record<string, Parser> = {
|
||||
},
|
||||
astFormat: "openapi-ast",
|
||||
locStart: (node: OpenAPINode) => 0,
|
||||
locEnd: (_node: OpenAPINode, text: string) => text.length,
|
||||
locEnd: (node: OpenAPINode) => node.content?.length || 0,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user