diff options
Diffstat (limited to 'dhall_core/src')
-rw-r--r-- | dhall_core/src/parser.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs index 8f9957a..637b75e 100644 --- a/dhall_core/src/parser.rs +++ b/dhall_core/src/parser.rs @@ -479,9 +479,13 @@ make_parser! { rule!(unquoted_path_component<&'a str>; captured_str!(s) => s); rule!(quoted_path_component<&'a str>; captured_str!(s) => s); - rule!(path_component<&'a str>; children!( - [unquoted_path_component(s)] => s, - [quoted_path_component(s)] => s, + rule!(path_component<String>; children!( + [unquoted_path_component(s)] => { + percent_encoding::percent_decode(s.as_bytes()) + .decode_utf8_lossy() + .into_owned() + }, + [quoted_path_component(s)] => s.to_string(), )); rule!(path<PathBuf>; children!( [path_component(components)..] => { |