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)
| 584 | // normalizeEntry extracts a key, value pair as the next two elements from the |
| 585 | // content slice. val source position information is normalized depending on style. |
| 586 | func normalizeEntry(content []*yaml.Node, i int) (key *yaml.Node, val *yaml.Node) { |
| 587 | key = content[i] |
| 588 | val = content[i+1] |
| 589 | if val.Style == yaml.FoldedStyle || val.Style == yaml.LiteralStyle { |
| 590 | val.Line++ |
| 591 | val.Column = key.Column + 1 |
| 592 | } |
| 593 | return key, val |
| 594 | } |
| 595 | |
| 596 | func (p *parserImpl) parseYAML(src *Source) *Policy { |
| 597 | // Parse yaml representation from the source to an object model. |