[core] Align URL token replacement behavior with GL JS
I.e. preserve unknown tokens in URLs rather than replacing them with an empty string.
This commit is contained in:
@@ -47,4 +47,7 @@ TEST(Token, replaceTokens) {
|
||||
if (token == "HØYDE") return "150";
|
||||
return "";
|
||||
}));
|
||||
EXPECT_EQ("{unknown}", mbgl::util::replaceTokens("{unknown}", [](const std::string&) -> optional<std::string> {
|
||||
return {};
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user