Skip to content

Commit

Permalink
fix link thing
Browse files Browse the repository at this point in the history
  • Loading branch information
arvid220u committed Jul 27, 2022
1 parent 266217a commit e1e6069
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ const urlMatcher: LinkMatcher = (text: string) => {
return null;
}

const url = match[0];
let url = match[0];

if (!(url.substring(0, 4) === "http" || url.substring(0, 3) === "ftp")) {
url = "https://" + url;
}

console.log(url);

return {
index: match.index,
Expand Down
2 changes: 1 addition & 1 deletion gui/src/renderer/components/Read.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function Read({
<hr className="border-asbrown-100" />
<div className="h-full w-full grow resize-none pt-4 pb-4 focus:outline-none">
<div
className="prose prose-sm prose-stone max-w-prose prose-h1:mt-6 first:prose-h1:mt-0"
className="prose prose-sm prose-stone prose-stonex max-w-prose prose-h1:mt-6 first:prose-h1:mt-0"
dangerouslySetInnerHTML={{
// eslint-disable-next-line @typescript-eslint/naming-convention
__html: purifiedMessage,
Expand Down

0 comments on commit e1e6069

Please sign in to comment.