mirror of
https://github.com/usememos/memos.git
synced 2025-10-26 22:36:16 +08:00
fix: Markdown hyperlinks with parenthesis take first closing parenthesis as final (#1213)
Updating regex to pick up edge case with parentheses
This commit is contained in:
parent
e83ea7fd76
commit
1b0629bf0f
1 changed files with 1 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ import BoldEmphasis from "./BoldEmphasis";
|
||||||
import PlainText from "./PlainText";
|
import PlainText from "./PlainText";
|
||||||
import { matcher } from "../matcher";
|
import { matcher } from "../matcher";
|
||||||
|
|
||||||
export const LINK_REG = /\[(.*?)\]\((.+?)\)+/;
|
export const LINK_REG = /\[(.*?)\]\((.+?)\)$/;
|
||||||
|
|
||||||
const renderer = (rawStr: string) => {
|
const renderer = (rawStr: string) => {
|
||||||
const matchResult = matcher(rawStr, LINK_REG);
|
const matchResult = matcher(rawStr, LINK_REG);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue