tag attributes now quoted

This commit is contained in:
j4nk 2022-12-29 11:51:11 -05:00
parent 60f9947916
commit ea65c1ed2d
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@
(defun md4tj-begin-tag (tag &optional attrs)
"Return beginning html tag for TAG with optional ATTRS."
(concat "<" tag
(mapconcat 'identity (cl-map 'listp (lambda (l) (concat " " (nth 0 l) "=" (nth 1 l))) attrs) "")
(mapconcat 'identity (cl-map 'listp (lambda (l) (concat " " (nth 0 l) "=" "\"" (nth 1 l) "\"")) attrs) "")
">"))
(defun md4tj-end-tag (tag)

View File

@ -4,8 +4,8 @@
<h3>Hello world!</h3>
<h4>Hello <strong><em>world</em></strong>!</h4>
<br/>
<p><a href=https://example.com>Example website</a></p>
<p><img src=usbs.png alt=Example image></p>
<p><a href="https://example.com">Example website</a></p>
<p><img src="usbs.png" alt="Example image"></p>
<br/>
<ul>
<li><p>unordered item 1</p></li>