diff options
author | Anthon van der Neut <anthon@mnt.org> | 2018-08-20 23:58:39 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2018-08-20 23:58:39 +0200 |
commit | 915682d59f937f6027032892e1b939e76678b9ac (patch) | |
tree | 01189586000b93976c71a27ca019e7d19b96e5d7 /ext | |
parent | f39bf3cbbc7815cd041ce9c04723209f2aff729e (diff) | |
download | ruamel.yaml-915682d59f937f6027032892e1b939e76678b9ac.tar.gz |
allow cloader to handle JSON's forward slash escape
Diffstat (limited to 'ext')
-rw-r--r-- | ext/scanner.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/scanner.c b/ext/scanner.c index bf2358a..6afaae3 100644 --- a/ext/scanner.c +++ b/ext/scanner.c @@ -3204,6 +3204,10 @@ yaml_parser_scan_flow_scalar(yaml_parser_t *parser, yaml_token_t *token, code_length = 8; break; + case '/': + *(string.pointer++) = '/'; /* JSON -> YAML 1.2 */ + break; + default: yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", start_mark, "found unknown escape character"); |