Skip to content

Commit

Permalink
fix: interpret inline http as links
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Mar 28, 2024
1 parent 1fb02fb commit 59cfb48
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ui/app/src/mdx/common/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ export function stringHasMarkdown(s: string): boolean {
return true;
}

// has plaintext links
if (s.match(/https?:\/\/|mailto:|tel:/)) {
return true;
}

// has html or jsx tags
if (s.includes("<")) {
return true;
Expand Down

0 comments on commit 59cfb48

Please sign in to comment.