Skip to content

Commit

Permalink
Fix description input
Browse files Browse the repository at this point in the history
  • Loading branch information
evadecker committed Nov 23, 2023
1 parent 5117bff commit 3666b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/new/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
const handleDescriptionInput: FormEventHandler<HTMLTextAreaElement> = (e) => {
$form.description = e.currentTarget.value;
// Replace any newlines with spaces and trim
$form.description = $form.description.replace(/\r?\n|\r/g, ' ').trim();
$form.description = $form.description.replace(/\r?\n|\r/g, ' ').trimStart();
$form.description = $form.description;
};
const handleContributorInput: FormEventHandler<HTMLInputElement> = (e) => {
$form.contributor = e.currentTarget.value;
// Trim spaces
$form.contributor = $form.contributor.trim();
$form.contributor = $form.contributor.trimStart();
};
const handleSubmit = () => {
Expand Down

0 comments on commit 3666b70

Please sign in to comment.