Skip to content

Commit

Permalink
Changed demo text on web app
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Jan 23, 2024
1 parent 2cfd8da commit 74be2af
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 0 additions & 19 deletions alice.txt

This file was deleted.

3 changes: 3 additions & 0 deletions demo.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 6 additions & 1 deletion harper-core/dictionary.dict
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
49568
50000
0/nm
0th/pt
1/n1
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -49576,3 +49580,4 @@ zydeco/M
zygote/SM
zygotic
zymurgy/M
StackOverflow/M
8 changes: 7 additions & 1 deletion harper-core/src/linting/repeated_words.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
Expand Down Expand Up @@ -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> {
Expand Down
4 changes: 2 additions & 2 deletions web/src/lib/Editor.svelte
Original file line number Diff line number Diff line change
@@ -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[] = [];
Expand Down

0 comments on commit 74be2af

Please sign in to comment.