From eba7517f65f2c975f35800cbf55145e7ccc48504 Mon Sep 17 00:00:00 2001 From: j4nk Date: Sun, 1 Jan 2023 10:30:40 -0500 Subject: [PATCH] Fixed link regex --- md4tj_parse.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/md4tj_parse.el b/md4tj_parse.el index 28f4d30..50e8c4e 100644 --- a/md4tj_parse.el +++ b/md4tj_parse.el @@ -37,11 +37,11 @@ "Process all inline elements of the LINE, return HTML." ;; Finally links (replace-regexp-in-string - "\\[\\(.*\\)\\](\\(.*\\))" + "\\[\\([^\\[]*\\)](\\([^\\[]*\\))" (concat (md4tj-begin-tag "a" (list '("href" "\\2"))) "\\1" (md4tj-end-tag "a")) ;; Then images (replace-regexp-in-string - "!\\[\\(.*\\)\\](\\(.*\\))" + "!\\[\\([^\\[]*\\)](\\([^\\[]*\\))" (md4tj-begin-tag "img" (list '("src" "\\2") '("alt" "\\1"))) ;; Then emphasis (replace-regexp-in-string