summaryrefslogtreecommitdiff
path: root/vendor/gopkg.in/yaml.v3/scannerc.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-09-23 08:19:05 -0700
committerJhon Honce <jhonce@redhat.com>2020-09-29 08:46:44 -0700
commit5aead1509c681de533b8966e781e15327fe35ab6 (patch)
tree8ba86faa76299b04e902b3bf11c5b7ce9872192a /vendor/gopkg.in/yaml.v3/scannerc.go
parent2ee415be90b8d6ab75f9fe579fc1b8690e023d3c (diff)
downloadpodman-5aead1509c681de533b8966e781e15327fe35ab6.tar.gz
podman-5aead1509c681de533b8966e781e15327fe35ab6.tar.bz2
podman-5aead1509c681de533b8966e781e15327fe35ab6.zip
Add X-Registry-Config support
* Refactor auth pkg to support X-Registry-Config * Refactor build endpoint to support X-Registry-Config. Supports: * --creds * --authfile * Added X-Reference-Id Header to http.Request to support log event correlation * Log headers from http.Request Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'vendor/gopkg.in/yaml.v3/scannerc.go')
-rw-r--r--vendor/gopkg.in/yaml.v3/scannerc.go21
1 files changed, 12 insertions, 9 deletions
diff --git a/vendor/gopkg.in/yaml.v3/scannerc.go b/vendor/gopkg.in/yaml.v3/scannerc.go
index 57e954ca5..d9a539c39 100644
--- a/vendor/gopkg.in/yaml.v3/scannerc.go
+++ b/vendor/gopkg.in/yaml.v3/scannerc.go
@@ -749,6 +749,11 @@ func yaml_parser_fetch_next_token(parser *yaml_parser_t) (ok bool) {
if !ok {
return
}
+ if len(parser.tokens) > 0 && parser.tokens[len(parser.tokens)-1].typ == yaml_BLOCK_ENTRY_TOKEN {
+ // Sequence indicators alone have no line comments. It becomes
+ // a head comment for whatever follows.
+ return
+ }
if !yaml_parser_scan_line_comment(parser, comment_mark) {
ok = false
return
@@ -2856,13 +2861,12 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t
return false
}
skip_line(parser)
- } else {
- if parser.mark.index >= seen {
- if len(text) == 0 {
- start_mark = parser.mark
- }
- text = append(text, parser.buffer[parser.buffer_pos])
+ } else if parser.mark.index >= seen {
+ if len(text) == 0 {
+ start_mark = parser.mark
}
+ text = read(parser, text)
+ } else {
skip(parser)
}
}
@@ -2999,10 +3003,9 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo
return false
}
skip_line(parser)
+ } else if parser.mark.index >= seen {
+ text = read(parser, text)
} else {
- if parser.mark.index >= seen {
- text = append(text, parser.buffer[parser.buffer_pos])
- }
skip(parser)
}
}