Skip to content

Commit

Permalink
Minor things - Should squash
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Jan 15, 2024
1 parent 08ca968 commit 8c30548
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 23 deletions.
6 changes: 0 additions & 6 deletions english_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320399,12 +320399,6 @@ tezcatzoncatl
tezcucan
tezkere
tezkirah
tfr
tg
tgn
tgt
th
tha
thack
thacked
thacker
Expand Down
2 changes: 1 addition & 1 deletion lt-core/benches/spellcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn criterion_benchmark(c: &mut Criterion) {
let dictionary = Dictionary::new();

group.bench_function("dict create", |b| b.iter(Dictionary::new));
group.bench_function("hello 5", |b| b.iter(|| spellcheck(&dictionary)));
group.bench_function("hello 5", |b| b.iter(|| spellcheck(dictionary)));
}

criterion_group!(benches, criterion_benchmark);
Expand Down
2 changes: 1 addition & 1 deletion lt-core/src/linting/spell_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn spell_check(document: &Document, _dictionary: &Dictionary) -> Vec<Lint> {
continue;
}

let possibilities = suggest_correct_spelling(word_chars, 3, 3, &dictionary);
let possibilities = suggest_correct_spelling(word_chars, 3, 3, dictionary);

let suggestions = possibilities
.into_iter()
Expand Down
1 change: 0 additions & 1 deletion web/src/lib/Underlines.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
if (output.length > 0) {
output.push(undefined);
}
console.log(chunk);
output.push(chunk);
}
Expand Down
17 changes: 3 additions & 14 deletions web/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@
setTimeout(ping, 1000);
}
type Category = 'mild' | 'moderate';
function categoryToColor(category: Category): string {
switch (category) {
case 'mild':
return '#708b75';
case 'moderate':
return '#f3a712';
}
}
ping();
$: console.log(focused);
Expand All @@ -51,7 +40,7 @@
<Card class="flex flex-col flex-grow">
{#each lints as lint, i}
<Card class="m-1 hover:translate-x-3 transition-all" on:click={() => (focused = i)}>
<div class="pl-2" style={`border-left: 3px solid ${categoryToColor('mild')}`}>
<div class="pl-2 border-l-[3px] border-l-primary-500">
<div class="flex flex-row">
<h3 class="font-bold">
{lint.lint_kind} - “<span class="italic">
Expand All @@ -60,15 +49,15 @@
</h3>
</div>
<div
class="transition-all overflow-hidden"
class="transition-all overflow-hidden flex flex-col justify-evenly"
style={`height: ${
focused === i ? `calc(55px * ${lint.suggestions.length + 1})` : '0px'
}`}
>
<p style="height: 50px">{lint.message}</p>
{#each lint.suggestions as suggestion}
<Button
color="alternative"
color="primary"
class="w-full mb-1"
style="height: 40px; margin: 5px 0px;"
on:click={() =>
Expand Down

0 comments on commit 8c30548

Please sign in to comment.