Merge dc7f6815fb into sapling-pr-archive-AdeAttwood
This commit is contained in:
commit
f2eb28cb6c
4 changed files with 18 additions and 6 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
|
@ -429,9 +429,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.8.0"
|
||||
version = "1.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1"
|
||||
checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051"
|
||||
dependencies = [
|
||||
"either",
|
||||
"rayon-core",
|
||||
|
|
@ -439,9 +439,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.12.0"
|
||||
version = "1.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed"
|
||||
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
|
||||
dependencies = [
|
||||
"crossbeam-deque",
|
||||
"crossbeam-utils",
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ path = "rust/lib.rs"
|
|||
[dependencies]
|
||||
ignore = "0.4.22"
|
||||
fuzzy-matcher = "0.3.7"
|
||||
rayon = "1.8.0"
|
||||
rayon = "1.8.1"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.5.1"
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@ utils.line_action = function()
|
|||
end
|
||||
|
||||
utils.escape_file_name = function(input)
|
||||
return string.gsub(input, "([$])", "\\%1")
|
||||
local file, _ = string.gsub(input, "([$%]\\[])", "\\%1")
|
||||
return file
|
||||
end
|
||||
|
||||
return utils
|
||||
|
|
|
|||
11
lua/ivy/utils_escape_test.lua
Normal file
11
lua/ivy/utils_escape_test.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
local utils = require "ivy.utils"
|
||||
|
||||
it("will escape a dollar in the file name", function(t)
|
||||
local result = utils.escape_file_name "/path/to/$file/$name.lua"
|
||||
t.assert_equal(result, "/path/to/\\$file/\\$name.lua")
|
||||
end)
|
||||
|
||||
it("will escape a brackets in the file name", function(t)
|
||||
local result = utils.escape_file_name "/path/to/[file]/[name].lua"
|
||||
t.assert_equal(result, "/path/to/\\[file\\]/\\[name\\].lua")
|
||||
end)
|
||||
Loading…
Reference in a new issue