Skip to content

Commit 4c0120e

Browse files
committed
handle a corner case
1 parent 057f15e commit 4c0120e

File tree

2 files changed

+7
-4
lines changed
  • src/doc/rustc-dev-guide

2 files changed

+7
-4
lines changed

src/doc/rustc-dev-guide/ci/sembr/src/main.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ struct Cli {
1919
show_diff: bool,
2020
}
2121

22-
static REGEX_IGNORE: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"(\d\.|\-|\*)\s+").unwrap());
22+
static REGEX_IGNORE: LazyLock<Regex> =
23+
LazyLock::new(|| Regex::new(r"^\s*(\d\.|\-|\*)\s+").unwrap());
2324
static REGEX_IGNORE_END: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"(\.|\?|;|!)$").unwrap());
2425
static REGEX_SPLIT: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"(\.|\?|;|!)\s+").unwrap());
2526

@@ -173,7 +174,7 @@ ignore e.g. and i.e.
173174
```
174175
some code. block
175176
```
176-
some more text.
177+
sentence with *italics* should not be ignored. truly.
177178
";
178179
let expected = "\
179180
# some. heading
@@ -190,7 +191,8 @@ ignore e.g. and i.e.
190191
```
191192
some code. block
192193
```
193-
some more text.
194+
sentence with *italics* should not be ignored.
195+
truly.
194196
";
195197
assert_eq!(expected, comply(original));
196198
}

src/doc/rustc-dev-guide/src/tests/codegen-backend-tests/cg_gcc.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ For example:
4949
```
5050

5151
The first backend in the `codegen-backends` array will determine which backend will be used as the
52-
*default backend* of the built `rustc`. This also determines which backend will be used to compile the
52+
*default backend* of the built `rustc`.
53+
This also determines which backend will be used to compile the
5354
stage 1 standard library (or anything built in stage 2+).
5455
To produce `rustc` that uses the GCC backend
5556
by default, you can thus put `"gcc"` as the first element of this array:

0 commit comments

Comments
 (0)