Skip to content

Commit

Permalink
Linkify should work for http:// as well
Browse files Browse the repository at this point in the history
  • Loading branch information
u8sand committed Sep 11, 2024
1 parent 7994f17 commit d4f9606
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/linkify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function matchAll(str: string, re: RegExp) {

export default function Linkify({ children }: { children?: string | null }) {
if (!children) return children
const { i, el } = matchAll(children, /(doi:|https:\/\/)([^\s]+)/g)
const { i, el } = matchAll(children, /(doi:|https?:\/\/)([^\s]+)/g)
.reduce(({ i, el }, m) => m.index ? ({
i: m.index + m[0].length,
el: [
Expand Down

0 comments on commit d4f9606

Please sign in to comment.