Fixed link regex

This commit is contained in:
j4nk 2023-01-01 10:30:40 -05:00
parent 1437b079d4
commit eba7517f65
1 changed files with 2 additions and 2 deletions

View File

@ -37,11 +37,11 @@
"Process all inline elements of the LINE, return HTML." "Process all inline elements of the LINE, return HTML."
;; Finally links ;; Finally links
(replace-regexp-in-string (replace-regexp-in-string
"\\[\\(.*\\)\\](\\(.*\\))" "\\[\\([^\\[]*\\)](\\([^\\[]*\\))"
(concat (md4tj-begin-tag "a" (list '("href" "\\2"))) "\\1" (md4tj-end-tag "a")) (concat (md4tj-begin-tag "a" (list '("href" "\\2"))) "\\1" (md4tj-end-tag "a"))
;; Then images ;; Then images
(replace-regexp-in-string (replace-regexp-in-string
"!\\[\\(.*\\)\\](\\(.*\\))" "!\\[\\([^\\[]*\\)](\\([^\\[]*\\))"
(md4tj-begin-tag "img" (list '("src" "\\2") '("alt" "\\1"))) (md4tj-begin-tag "img" (list '("src" "\\2") '("alt" "\\1")))
;; Then emphasis ;; Then emphasis
(replace-regexp-in-string (replace-regexp-in-string