Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

Changed demo text on web app

Elijah Potter74be2af59ca9
diff --git a/Dockerfile b/Dockerfile
index f503b7865..c999e8124 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,7 +19,7 @@ RUN mkdir harper-wasm
COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg
COPY web web
-COPY alice.txt .
+COPY demo.md .
WORKDIR /usr/build/web
diff --git a/alice.txt b/alice.txt
deleted file mode 100644
index 36a55fdac..000000000
--- a/alice.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-after a time she heard a little pattering of feet in the distance, and
-she hastily dried her eyes to see what was coming. It was the White
-Rabbit returning, splendidly dressed, with a pair of white kid gloves in
-one hand and a large fan in the other: he came trotting along in a great
-hurry, muttering to himself as he came, "Oh! the Duchess, the Duchess!
-Oh! won't she be savage if I've kept her 100 waiting!" Alice felt so
-desperate that she was ready to ask help of any one; so, when the
-Rabbit came near her, she began, in a low, timid voice, "If you please,
-sir---" The Rabbit started violently, dropped the white kid gloves and
-the fan, and scurried away into the darkness as hard as he could go.
-
-Alice took up the fan and gloves, and, as the hall was very hot, she
-kept fanning hrself all the time she went on talking! "Dear, dear! How
-queer everything is today! And yesterday things went on just as usual.
-I wonder if I've been changed during the night? Let me think: was I
-the same when I got up this morning? I almost think I can remember
-feeling a little different. But if I'm not the same, the next question
-is, who in the world am I? Ah, that's the great puzzle!" And she began
-thinking over all the children she knew that were of the same age as
diff --git a/demo.md b/demo.md
new file mode 100644
index 000000000..df49aebe2
--- /dev/null
+++ b/demo.md
@@ -0,0 +1,3 @@
+Harper is a language checker for artists. it can detect
+improper capitalization and mispelled words. There are some cases,
+where the the standard grammar checkers don't cut it. That's where Harper comes in handy.
diff --git a/harper-core/dictionary.dict b/harper-core/dictionary.dict
index 5bdea91a8..73c70a20a 100644
--- a/harper-core/dictionary.dict
+++ b/harper-core/dictionary.dict
@@ -1,4 +1,4 @@
-49568
+50000
0/nm
0th/pt
1/n1
@@ -10729,7 +10729,11 @@ Maia/M
Semele/M
Chiron/M
Katniss/M
+Cloudflare/M
+TLS
Everdeen/M
+pseudorandom/P
+counterintuitively
Leto/M
Ouranos/M
Hecatoncheires/M
@@ -49576,3 +49580,4 @@ zydeco/M
zygote/SM
zygotic
zymurgy/M
+StackOverflow/M
diff --git a/harper-core/src/linting/repeated_words.rs b/harper-core/src/linting/repeated_words.rs
index d1828e8b3..0a778e623 100644
--- a/harper-core/src/linting/repeated_words.rs
+++ b/harper-core/src/linting/repeated_words.rs
@@ -7,7 +7,7 @@ use crate::{
use super::{Lint, LintKind, Linter};
-#[derive(Debug, Clone, Default)]
+#[derive(Debug, Clone)]
pub struct RepeatedWords {
/// The set of words that can be considered for repetition checking.
set: HashSet<Vec<char>>,
@@ -47,6 +47,12 @@ impl RepeatedWords {
}
}
+impl Default for RepeatedWords {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
impl Linter for RepeatedWords {
/// A linter that checks to make sure the first word of each sentence is capitalized.
fn lint(&mut self, document: &Document) -> Vec<Lint> {
diff --git a/web/src/lib/Editor.svelte b/web/src/lib/Editor.svelte
index 685e27ae3..e81dfae99 100644
--- a/web/src/lib/Editor.svelte
+++ b/web/src/lib/Editor.svelte
@@ -1,12 +1,12 @@
<script lang="ts">
import { Card } from 'flowbite-svelte';
- import alice from '../../../alice.txt?raw';
+ import demo from '../../../demo.md?raw';
import Underlines from '$lib/Underlines.svelte';
import { Button } from 'flowbite-svelte';
import { lintText, applySuggestion, spanContent } from '$lib/analysis';
import type { Lint } from '$lib/analysis';
- let content = alice;
+ let content = demo;
let lints: Lint[] = [];
let lintCards: HTMLDivElement[] = [];