Skip to content

Commit

Permalink
Convert to lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRazor1337 committed Oct 13, 2023
1 parent 5b70cfe commit 099ecd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const isValidURL = (url: string) => {
const urlToHyperlink = (url: string) => {
if (!isValidURL(url)) return url;

url = url.trim().replace('www.', '');
url = url.trim().toLocaleLowerCase().replace('www.', '');
const elements = url.split('/')
let name = elements[elements.length - 1] !== '' ? elements[elements.length - 1] : elements[elements.length - 2];

Expand Down

0 comments on commit 099ecd9

Please sign in to comment.