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