Fixed issue where link generation broke for parentheses

This commit is contained in:
j4nk 2023-01-04 12:38:23 -05:00
parent 478794fb62
commit 87c53d901e
3 changed files with 7 additions and 5 deletions

View File

@ -45,15 +45,15 @@
"<mark>\\1</mark>" "<mark>\\1</mark>"
;; Then links ;; Then 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 videos ;; Then videos
(replace-regexp-in-string (replace-regexp-in-string
"!!\\[\\([^\\[]*\\)](\\([^\\[]*\\))" "!!\\[\\([^\\[]*\\)](\\([^\\[(]*\\))"
(concat (md4tj-begin-tag "video" (list '("src" "\\2") '("type" "video/webm") '("controls" "true"))) "\\1" (md4tj-end-tag "video")) (concat (md4tj-begin-tag "video" (list '("src" "\\2") '("type" "video/webm") '("controls" "true"))) "\\1" (md4tj-end-tag "video"))
;; Then emphasis ;; Then emphasis
(replace-regexp-in-string (replace-regexp-in-string

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en-us"> <html lang="en">
<head> <head>
@ -46,6 +46,7 @@ int main() {
</code> </code>
</pre> </pre>
<br/> <br/>
Last updated: Wed Jan 4 11:41:25 2023 <p><a href="https://crawl.develz.org">Dungeon Crawl Stone Soup</a> - My favorite FOSS roguelike (Yes, I know the greatest roguelike of all time is NetHack, I don't care).</p>
Last updated: Wed Jan 4 12:38:04 2023
</body> </body>
</html> </html>

View File

@ -27,4 +27,5 @@ int main() {
return 0; return 0;
} }
``` ```
[Dungeon Crawl Stone Soup](https://crawl.develz.org) - My favorite FOSS roguelike (Yes, I know the greatest roguelike of all time is NetHack, I don't care).
@@LASTUPDATED @@LASTUPDATED