Skip to content

Commit 407f6d3

Browse files
committed
changelog: 1.8.4
1 parent b2ca9c1 commit 407f6d3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

CHANGELOG.md

+25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
1.8.4 (2023-06-05)
2+
==================
3+
This is a patch release that fixes a bug where `(?-u:\B)` was allowed in
4+
Unicode regexes, despite the fact that the current matching engines can report
5+
match offsets between the code units of a single UTF-8 encoded codepoint. That
6+
in turn means that match offsets that split a codepoint could be reported,
7+
which in turn results in panicking when one uses them to slice a `&str`.
8+
9+
This bug occurred in the transition to `regex 1.8` because the underlying
10+
syntactical error that prevented this regex from compiling was intentionally
11+
removed. That's because `(?-u:\B)` will be permitted in Unicode regexes in
12+
`regex 1.9`, but the matching engines will guarantee to never report match
13+
offsets that split a codepoint. When the underlying syntactical error was
14+
removed, no code was added to ensure that `(?-u:\B)` didn't compile in the
15+
`regex 1.8` transition release. This release, `regex 1.8.4`, adds that code
16+
such that `Regex::new(r"(?-u:\B)")` returns to the `regex <1.8` behavior of
17+
not compiling. (A `bytes::Regex` can still of course compile it.)
18+
19+
Bug fixes:
20+
21+
* [BUG #1006](https://github.com/rust-lang/regex/issues/1006):
22+
Fix a bug where `(?-u:\B)` was allowed in Unicode regexes, and in turn could
23+
lead to match offsets that split a codepoint in `&str`.
24+
25+
126
1.8.3 (2023-05-25)
227
==================
328
This is a patch release that fixes a bug where the regex would report a

0 commit comments

Comments
 (0)