More robust matching #16

Closed
opened 2022-11-10 07:20:28 +00:00 by emma · 0 comments
Owner

Currently, matching for extensions is subpar:

MATCH="$(printf "%s\n" "$URL" | sed -ne 's/^h.\+\/\///p' |\
  sed -e 's/\/.*\+//g')"

change to:

MATCH="$(printf "%s\n" "$URL" |\
  sed -n '/^https?:\/\/.*\.?.\+\..\+\//p')"

then make extensions formatted as http(s)://sub.domain.tld/

Currently, matching for extensions is subpar: ```sh MATCH="$(printf "%s\n" "$URL" | sed -ne 's/^h.\+\/\///p' |\ sed -e 's/\/.*\+//g')" ``` change to: ```sh MATCH="$(printf "%s\n" "$URL" |\ sed -n '/^https?:\/\/.*\.?.\+\..\+\//p')" ``` then make extensions formatted as `http(s)://sub.domain.tld/`
emma added reference rewrite 2023-03-20 23:18:39 +00:00
emma closed this issue 2023-03-22 17:51:16 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: emma/xdg-sanity#16
No description provided.