Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/elements/forms/inputCron.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
let element: HTMLInputElement;
let error: string;
const pattern = String.raw`^[^]+\s+[^]+\s+[^]+\s+[^]+\s+[^]+`;
const pattern = String.raw`/(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})/`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regexes are hard to understand and maintain. Would you be able to try and break this apart and add comments to try and help explain it?

onMount(() => {
if (element && autofocus) {
Expand Down