diff options
author | Edwin Pujols <73705427+shade-of-noon@users.noreply.github.com> | 2020-12-11 19:54:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-11 18:54:39 -0500 |
commit | f2ec0586021dd363566922bd7d6dbd3ab7703e38 (patch) | |
tree | 334d125b55c2d886a6cafd5eba0cf63e60e8fe2d /test/functional/eval/msgpack_functions_spec.lua | |
parent | 4620ad604f58f22e07152b80a4969055643f684f (diff) | |
download | rneovim-f2ec0586021dd363566922bd7d6dbd3ab7703e38.tar.gz rneovim-f2ec0586021dd363566922bd7d6dbd3ab7703e38.tar.bz2 rneovim-f2ec0586021dd363566922bd7d6dbd3ab7703e38.zip |
tests: Take into account magic hyphen. (#13518)
In Lua patterns the hyphen works like a non-greedy version of Vim's `*`.
- Use `%-` when you need a literal hyphen.
- If you don't need a regular expression at all, use something like
```
string.find(text, pattern, 1, true)
```
so that the pattern is regarded as a plain, non-magical string.
See [1] and [2] in the Lua manual.
[1]: https://www.lua.org/manual/5.1/manual.html#pdf-Patterns
[2]: https://www.lua.org/manual/5.1/manual.html#pdf-string.find
Diffstat (limited to 'test/functional/eval/msgpack_functions_spec.lua')
0 files changed, 0 insertions, 0 deletions