(subLocation JSONPathLocation, nestedSection NestedSection, baseIndent int)
| 352 | } |
| 353 | |
| 354 | func mapNestedLocationToOriginal(subLocation JSONPathLocation, nestedSection NestedSection, baseIndent int) JSONPathLocation { |
| 355 | originalLine := nestedSection.startLine + subLocation.Line // +1 to skip section header, -1 for 0-based indexing |
| 356 | originalColumn := subLocation.Column |
| 357 | |
| 358 | if baseIndent > 0 { |
| 359 | originalColumn += baseIndent |
| 360 | } |
| 361 | |
| 362 | return JSONPathLocation{ |
| 363 | Line: originalLine + 1, // Convert back to 1-based line numbers |
| 364 | Column: originalColumn, |
| 365 | Found: true, |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | // NestedSection represents a section of YAML content that corresponds to a nested object |
| 370 | type NestedSection struct { |
no outgoing calls
no test coverage detected