From b364e8ea2ce3bc838fdd97e4174c6decbe430aeb Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 21 May 2021 12:56:32 +0200 Subject: [PATCH] Fix typos (#1540) Signed-off-by: Andrea Gelmini --- CONTRIBUTING.md | 2 +- guide/src/format/theme/editor.md | 4 ++-- src/book/summary.rs | 2 +- src/config.rs | 2 +- src/renderer/html_handlebars/search.rs | 2 +- src/utils/fs.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 01b1c2e1..31a44761 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,7 +79,7 @@ For more information, such as running it from your favourite editor, please see #### Finding Issues with Clippy -Clippy is a code analyser/linter detecting mistakes, and therfore helps to improve your code. +Clippy is a code analyser/linter detecting mistakes, and therefore helps to improve your code. Like formatting your code with `rustfmt`, running clippy regularly and before your Pull Request will help us maintain awesome code. diff --git a/guide/src/format/theme/editor.md b/guide/src/format/theme/editor.md index e39032f5..04f6cc91 100644 --- a/guide/src/format/theme/editor.md +++ b/guide/src/format/theme/editor.md @@ -33,7 +33,7 @@ Note the new `Undo Changes` button in the editable playgrounds. ## Customizing the Editor By default, the editor is the [Ace](https://ace.c9.io/) editor, but, if desired, -the functionality may be overriden by providing a different folder: +the functionality may be overridden by providing a different folder: ```toml [output.html.playground] @@ -42,5 +42,5 @@ editor = "/path/to/editor" ``` Note that for the editor changes to function correctly, the `book.js` inside of -the `theme` folder will need to be overriden as it has some couplings with the +the `theme` folder will need to be overridden as it has some couplings with the default Ace editor. diff --git a/src/book/summary.rs b/src/book/summary.rs index 8012e183..822a7c76 100644 --- a/src/book/summary.rs +++ b/src/book/summary.rs @@ -173,7 +173,7 @@ struct SummaryParser<'a> { /// `Event::End` is encountered which matches the `$delimiter` pattern. /// /// This is the equivalent of doing -/// `$stream.take_while(|e| e != $delimeter).collect()` but it allows you to +/// `$stream.take_while(|e| e != $delimiter).collect()` but it allows you to /// use pattern matching and you won't get errors because `take_while()` /// moves `$stream` out of self. macro_rules! collect_events { diff --git a/src/config.rs b/src/config.rs index 78fdc3ad..a72d00de 100644 --- a/src/config.rs +++ b/src/config.rs @@ -656,7 +656,7 @@ pub struct Search { pub boost_paragraph: u8, /// True if the searchword `micro` should match `microwave`. Default: `true`. pub expand: bool, - /// Documents are split into smaller parts, seperated by headings. This defines, until which + /// Documents are split into smaller parts, separated by headings. This defines, until which /// level of heading documents should be split. Default: `3`. (`### This is a level 3 heading`) pub heading_split_level: u8, /// Copy JavaScript files for the search functionality to the output directory? diff --git a/src/renderer/html_handlebars/search.rs b/src/renderer/html_handlebars/search.rs index 8ee9b0af..e9da2196 100644 --- a/src/renderer/html_handlebars/search.rs +++ b/src/renderer/html_handlebars/search.rs @@ -141,7 +141,7 @@ fn render_item( body.push_str(&clean_html(&html_block)); } Event::Start(_) | Event::End(_) | Event::Rule | Event::SoftBreak | Event::HardBreak => { - // Insert spaces where HTML output would usually seperate text + // Insert spaces where HTML output would usually separate text // to ensure words don't get merged together if in_heading { heading.push(' '); diff --git a/src/utils/fs.rs b/src/utils/fs.rs index 1c80abbb..2d5ce8b7 100644 --- a/src/utils/fs.rs +++ b/src/utils/fs.rs @@ -4,7 +4,7 @@ use std::fs::{self, File}; use std::io::Write; use std::path::{Component, Path, PathBuf}; -/// Naively replaces any path seperator with a forward-slash '/' +/// Naively replaces any path separator with a forward-slash '/' pub fn normalize_path(path: &str) -> String { use std::path::is_separator; path.chars()