mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-09 09:49:10 +02:00
Fix typos (#277)
This commit is contained in:
parent
543fa2290d
commit
97b4395e25
2 changed files with 5 additions and 5 deletions
|
|
@ -83,7 +83,7 @@ fn highlight_code<'a, E>(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Yields `NormalCode` and `CommandName` in alternating order according to the occurences of
|
||||
/// Yields `NormalCode` and `CommandName` in alternating order according to the occurrences of
|
||||
/// `command_name` in `segment`. Variables are not detected here, see `highlight_code`
|
||||
/// instead.
|
||||
fn highlight_code_segment<'a, E>(
|
||||
|
|
@ -113,15 +113,15 @@ fn highlight_code_segment<'a, E>(
|
|||
}
|
||||
|
||||
/// Checks whether the characters right before and after the substring (given by half-open index interval) are whitespace (if they exist).
|
||||
fn is_freestanding_substring(surrouding: &str, substring: (usize, usize)) -> bool {
|
||||
fn is_freestanding_substring(surrounding: &str, substring: (usize, usize)) -> bool {
|
||||
let (start, end) = substring;
|
||||
// "okay" meaning <exists and is whitespace> or <doesn't exist>
|
||||
let char_before_is_okay = surrouding[..start]
|
||||
let char_before_is_okay = surrounding[..start]
|
||||
.chars()
|
||||
.last()
|
||||
.filter(|prev_char| !prev_char.is_whitespace())
|
||||
.is_none();
|
||||
let char_after_is_okay = surrouding[end..]
|
||||
let char_after_is_okay = surrounding[end..]
|
||||
.chars()
|
||||
.next()
|
||||
.filter(|next_char| !next_char.is_whitespace())
|
||||
|
|
|
|||
|
|
@ -624,7 +624,7 @@ fn test_custom_page_overwrites() {
|
|||
.stdout(diff(expected));
|
||||
}
|
||||
|
||||
/// End-End test to ensure that .patch files are appened to pages in the cache_dir
|
||||
/// End-End test to ensure that .patch files are appended to pages in the cache_dir
|
||||
#[test]
|
||||
fn test_custom_patch_appends_to_common() {
|
||||
let testenv = TestEnv::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue