Skip to content

Commit

Permalink
fix: broken links and URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Mar 4, 2024
1 parent 249ad90 commit 9d09099
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 20 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<h1>Harper</h1>
</div>

[![Harper LS](https://github.com/chilipepperhott/harper/actions/workflows/build_harper_ls.yml/badge.svg)](https://github.com/chilipepperhott/harper/actions/workflows/build_harper_ls.yml)
[![Web](https://github.com/chilipepperhott/harper/actions/workflows/build_web.yml/badge.svg)](https://github.com/chilipepperhott/harper/actions/workflows/build_web.yml)
[![Precommit](https://github.com/chilipepperhott/harper/actions/workflows/precommit.yml/badge.svg)](https://github.com/chilipepperhott/harper/actions/workflows/precommit.yml)
[![Harper LS](https://github.com/elijah-potter/harper/actions/workflows/build_harper_ls.yml/badge.svg)](https://github.com/elijah-potter/harper/actions/workflows/build_harper_ls.yml)
[![Web](https://github.com/elijah-potter/harper/actions/workflows/build_web.yml/badge.svg)](https://github.com/elijah-potter/harper/actions/workflows/build_web.yml)
[![Precommit](https://github.com/elijah-potter/harper/actions/workflows/precommit.yml/badge.svg)](https://github.com/elijah-potter/harper/actions/workflows/precommit.yml)

Harper is an English grammar checker designed to be _just right._
I created it after years of dealing with the shortcomings of the competition.

Grammarly was too expensive and too overbearing.
It's suggestions lacked context, and were often just plain _wrong_.
Its suggestions lacked context, and were often just plain _wrong_.
Not to mention: it's a privacy nightmare.
Everything you write with Grammarly is sent to their servers.
Their privacy policy claims they don't sell the data, but that doesn't mean they don't use it to train large language models and god knows what else.
Expand Down
2 changes: 1 addition & 1 deletion harper-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
description = "The language checker for developers."
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/chilipepperhott/harper"
homepage = "https://github.com/elijah-potter/harper"

[dependencies]
blanket = "0.3.0"
Expand Down
13 changes: 3 additions & 10 deletions harper-core/src/linting/an_a.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,17 @@ impl Linter for AnA {
// Matches with 99.71% and 99.77% of vowels and non-vowels in the
// Carnegie-Mellon University word -> pronunciation dataset.
fn starts_with_vowel(word: &[char]) -> bool {
if word.is_empty() {
return false;
}

if matches!(
word,
['e', 'u', 'p', 'h', ..] | ['e', 'u', 'g' | 'l' | 'c', ..]
[] | ['u', 'k', ..] | ['e', 'u', 'p', 'h', ..] | ['e', 'u', 'g' | 'l' | 'c', ..]
) {
return false;
}

if matches!(word, ['u', 'k', ..]) {
return false;
}

if matches!(
word,
['h', 'o', 'u', 'r', ..]
['S', 'V', 'G']
| ['h', 'o', 'u', 'r', ..]
| ['h', 'o', 'n', ..]
| ['u', 'n', 'i', 'n' | 'm', ..]
| ['u', 'n', 'a' | 'u', ..]
Expand Down
2 changes: 1 addition & 1 deletion harper-core/src/spell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn suggest_correct_spelling<'a>(
misspelled_word.len() - max_edit_dist as usize
};

// Note how we look at the biggest words first
// Note how we look at the biggest words first.
let words_to_search = (shortest_word_len..misspelled_word.len() + max_edit_dist as usize)
.rev()
.flat_map(|len| dictionary.words_with_len_iter(len));
Expand Down
2 changes: 1 addition & 1 deletion harper-ls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
description = "The language checker for developers."
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/chilipepperhott/harper"
homepage = "https://github.com/elijah-potter/harper"

[dependencies]
harper-core = { path = "../harper-core", version = "0.7.0" }
Expand Down
4 changes: 2 additions & 2 deletions web/src/lib/Editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
$: lintText(content).then((newLints) => (lints = newLints));
$: boxHeight = calcHeight(content);
$: if (focused != null && lintCards[focused])
lintCards[focused].scrollIntoView({ behavior: 'smooth' });
lintCards[focused].scrollIntoView({ behavior: 'smooth', block: 'center' });
$: if (editor != null && focused != null) {
let lint = lints[focused % lints.length];
Expand Down Expand Up @@ -74,7 +74,7 @@
focused === i ? `calc(55px * ${lint.suggestions.length + 1})` : '0px'
}`}
>
<p style="height: 50px">{lint.message}</p>
<p style="height: 50px" class="text-left">{lint.message}</p>
{#each lint.suggestions as suggestion}
<div class="w-full p-[4px]">
<Button
Expand Down
2 changes: 1 addition & 1 deletion web/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<div class="flex flex-row justify-evenly mt-5">
<a
href="https://github.com/chilipepperhott/harper"
href="https://github.com/elijah-potter/harper"
class="flex flex-row items-center [&>*]:m-2 dark:text-white"
><img
width="40"
Expand Down

0 comments on commit 9d09099

Please sign in to comment.