Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: update markdown hyperlink regex (#1315)

Baptiste Roux93609ca73161
diff --git a/web/src/labs/marked/parser/Link.tsx b/web/src/labs/marked/parser/Link.tsx
index 1faeef001..0eda5260b 100644
--- a/web/src/labs/marked/parser/Link.tsx
+++ b/web/src/labs/marked/parser/Link.tsx
@@ -6,7 +6,7 @@ import BoldEmphasis from "./BoldEmphasis";
import PlainText from "./PlainText";
import { matcher } from "../matcher";
-export const LINK_REG = /\[(.*?)\]\((.+?)\)+/;
+export const LINK_REG = /\[([^\]]+)\]\(([^)]+)\)/;
const renderer = (rawStr: string) => {
const matchResult = matcher(rawStr, LINK_REG);