normalizeEntry extracts a key, value pair as the next two elements from the content slice. val source position information is normalized depending on style.
(content []*yaml.Node, i int)
| 542 | // normalizeEntry extracts a key, value pair as the next two elements from the |
| 543 | // content slice. val source position information is normalized depending on style. |
| 544 | func normalizeEntry(content []*yaml.Node, i int) (key *yaml.Node, val *yaml.Node) { |
| 545 | key = content[i] |
| 546 | val = content[i+1] |
| 547 | if val.Style == yaml.FoldedStyle || val.Style == yaml.LiteralStyle { |
| 548 | val.Line++ |
| 549 | val.Column = key.Column + 1 |
| 550 | } |
| 551 | return key, val |
| 552 | } |
| 553 | |
| 554 | func (p *parserImpl) parseYAML(src *Source) *Policy { |
| 555 | // Parse yaml representation from the source to an object model. |