diff --git a/src/emitter.c b/src/emitter.c index f2b215f1..0b6936bb 100644 --- a/src/emitter.c +++ b/src/emitter.c @@ -1421,7 +1421,11 @@ yaml_emitter_analyze_anchor(yaml_emitter_t *emitter, } while (string.pointer != string.end) { - if (!IS_ALPHA(string)) { + if ( + !IS_ALPHA(string) + && !CHECK(string, '.') + && !CHECK(string, '/') + ) { return yaml_emitter_set_emitter_error(emitter, alias ? "alias value must contain alphanumerical characters only" : "anchor value must contain alphanumerical characters only"); diff --git a/src/scanner.c b/src/scanner.c index 3fb99f8a..0d04e78b 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -2336,7 +2336,11 @@ yaml_parser_scan_anchor(yaml_parser_t *parser, yaml_token_t *token, if (!CACHE(parser, 1)) goto error; - while (IS_ALPHA(parser->buffer)) { + while ( + IS_ALPHA(parser->buffer) + || CHECK(parser->buffer, '.') + || CHECK(parser->buffer, '/') + ) { if (!READ(parser, string)) goto error; if (!CACHE(parser, 1)) goto error; length ++;