diff --git a/README.md b/README.md index 2467fb2..834bfea 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ By default, the application creates the `hn-tui.log` log file inside the [user's - [x] front-page stories like the official site - [ ] real-time updating - [x] implement smarter lazy-loading comment functionality -- add crediential support to allow +- add credential support to allow - [x] authentication - [x] upvote/downvote - [ ] add comment diff --git a/hackernews_tui/src/client/mod.rs b/hackernews_tui/src/client/mod.rs index b789a90..925de64 100644 --- a/hackernews_tui/src/client/mod.rs +++ b/hackernews_tui/src/client/mod.rs @@ -246,7 +246,7 @@ impl HNClient { /// Reorder a list of stories to follow the same order as another list of story IDs. /// /// Needs to do this because stories returned by Algolia APIs are sorted by `points`, - /// reoder those stories to match the list shown up in the HackerNews website, + /// reorder those stories to match the list shown up in the HackerNews website, /// which has the same order as the list of IDs returned from the official API. fn reorder_stories_based_on_ids(&self, stories: Vec, ids: &[u32]) -> Vec { let mut stories = stories; @@ -326,7 +326,7 @@ impl HNClient { /// Get a list of stories filtering on a specific tag. /// - /// Depending on the specifed `sort_mode`, stories are retrieved based on + /// Depending on the specified `sort_mode`, stories are retrieved based on /// the Algolia API or a combination of Algolia API and the Official API. pub fn get_stories_by_tag( &self, diff --git a/hackernews_tui/src/main.rs b/hackernews_tui/src/main.rs index de0df4e..025e7be 100644 --- a/hackernews_tui/src/main.rs +++ b/hackernews_tui/src/main.rs @@ -111,7 +111,7 @@ fn init_app_dirs() -> (std::path::PathBuf, std::path::PathBuf) { let home_dir = dirs_next::home_dir().expect("failed to get user's home dir"); // Try to find application's config file in the user's config dir. - // If not found, fallback to use `$HOME/.config` (for backward compability reason) + // If not found, fallback to use `$HOME/.config` (for backward compatibility reason) if !config_dir.join(DEFAULT_CONFIG_FILE).exists() { config_dir = home_dir.join(".config"); } diff --git a/hackernews_tui/src/model.rs b/hackernews_tui/src/model.rs index d2aabeb..414f586 100644 --- a/hackernews_tui/src/model.rs +++ b/hackernews_tui/src/model.rs @@ -244,7 +244,7 @@ impl Story { } impl HnItem { - /// gets the dispay text of the item, which depends on the item's states + /// gets the display text of the item, which depends on the item's states /// (e.g `vote_status`, `display_state`, etc) pub fn text(&self, vote_status: Option) -> StyledString { let theme = config::get_config_theme(); diff --git a/hackernews_tui/src/parser/article.rs b/hackernews_tui/src/parser/article.rs index 7e95aa5..930452f 100644 --- a/hackernews_tui/src/parser/article.rs +++ b/hackernews_tui/src/parser/article.rs @@ -120,7 +120,7 @@ impl Article { content.replace('\n', &format!("\n{}", args.prefix)) } else { // Otherwise, consecutive whitespaces are ignored for non-pre elements. - // This is to prevent reader-mode engine from adding unneccesary line wraps/indents in a paragraph. + // This is to prevent reader-mode engine from adding unnecessary line wraps/indents in a paragraph. WS_RE.replace_all(&content, " ").to_string() }; let text = decode_html(&text); diff --git a/hackernews_tui/src/view/help_view.rs b/hackernews_tui/src/view/help_view.rs index 143bc55..d5a054c 100644 --- a/hackernews_tui/src/view/help_view.rs +++ b/hackernews_tui/src/view/help_view.rs @@ -394,11 +394,11 @@ impl HasHelpView for comment_view::CommentView { vec![ Command::new( comment_view_keymap.open_article_in_browser.to_string(), - "Open in browser the dicussed article", + "Open in browser the discussed article", ), Command::new( comment_view_keymap.open_article_in_article_view.to_string(), - "Open in article view the dicussed article", + "Open in article view the discussed article", ), Command::new( comment_view_keymap.open_story_in_browser.to_string(),