Skip to content

Commit

Permalink
fix(web): properly render Suggestion::InsertAfter in the editor
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Jan 7, 2025
1 parent 29983db commit 4b6f7e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Harper is an language checker for developers. it can detect
improper capitalization and misspellled words,
as well as a number of other issues.
Like if you break up words you shoul dn't.
Harper can be a lifesaver when writing technical documents,
emails or other formal forms of communication.

Harper works everywhere, even offline. Since you r data
never leaves your device, you don't ned to worry aout us
Expand Down
4 changes: 3 additions & 1 deletion packages/web/src/lib/Editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@
>
{#if suggestion.kind() == SuggestionKind.Remove}
Remove "{lint.get_problem_text()}"
{:else}
{:else if suggestion.kind() == SuggestionKind.Replace}
Replace "{lint.get_problem_text()}" with "{suggestion.get_replacement_text()}"
{:else}
Insert "{suggestion.get_replacement_text()}" after "{lint.get_problem_text()}"
{/if}
</Button>
</div>
Expand Down

0 comments on commit 4b6f7e5

Please sign in to comment.