mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
5b0996fd80
pcre2_substitute() now sets the output buffer length to PCRE2_UNSET (~0) if the output buffer is determined to be too small. This change keeps track of the buffer size separately where pcre2 can't touch it. A better fix would be to let pcre2 tell fish what size buffer it needs. This can be done with PCRE2_SUBSTITUTE_OVERFLOW_LENGTH, but this requires pcre2 10.21 or later (released January 12), which may be too new to introduce as a dependency at this point. Fixes #2743
47 lines
327 B
Text
47 lines
327 B
Text
12
|
|
ab
|
|
bc
|
|
de
|
|
example
|
|
com
|
|
/usr/local/bin
|
|
fish
|
|
a
|
|
b
|
|
c
|
|
1...2...3
|
|
abc
|
|
abc
|
|
x
|
|
zan
|
|
\cg
|
|
a
|
|
axxb
|
|
Axxb
|
|
ok?
|
|
dog
|
|
2:34:56
|
|
2
|
|
34
|
|
56
|
|
papa
|
|
pa
|
|
murmur
|
|
mur
|
|
2 2
|
|
4 2
|
|
6 2
|
|
0xBadC0de
|
|
blue was my favorite
|
|
1st
|
|
2nd
|
|
last
|
|
spaces_to_underscores
|
|
0 3.14 5
|
|
right left $
|
|
put a
|
|
here
|
|
aabb
|
|
invalid expression error
|
|
invalid argument error
|
|
missing argument returns 0
|