diff options
author | Nadrieril | 2019-05-02 21:08:31 +0200 |
---|---|---|
committer | Nadrieril | 2019-05-02 21:08:31 +0200 |
commit | dfeca33c91e58618bbffc382b62f2f4efb0ae26a (patch) | |
tree | 466fdbe5b1a12fdef06782809794a7e96ad7e7f8 /dhall | |
parent | 80f4cfeef3e5dfc6f2aab36c2562b1c0d2b576d8 (diff) |
Update dhall-lang submodule
Diffstat (limited to '')
m--------- | dhall-lang | 0 | ||||
-rw-r--r-- | dhall_core/Cargo.toml | 1 | ||||
-rw-r--r-- | dhall_core/src/parser.rs | 10 |
3 files changed, 8 insertions, 3 deletions
diff --git a/dhall-lang b/dhall-lang -Subproject 7e3721f1a535e4be79af39b2b6d86ee7ce43887 +Subproject f4a0a2dd3b55c3191a3ddac941387607699c3dc diff --git a/dhall_core/Cargo.toml b/dhall_core/Cargo.toml index 80cf721..476b9fa 100644 --- a/dhall_core/Cargo.toml +++ b/dhall_core/Cargo.toml @@ -10,6 +10,7 @@ doctest = false [dependencies] itertools = "0.8.0" +percent-encoding = "1.0.1" pest = "2.1" dhall_generated_parser = { path = "../dhall_generated_parser" } improved_slice_patterns = { version = "2.0.0", path = "../improved_slice_patterns" } 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)..] => { |