Created
March 3, 2011 02:57
-
-
Save torus/852237 to your computer and use it in GitHub Desktop.
yahtml for XHTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 127a36f4cd6a yahtml.el | |
--- a/yahtml.el Mon Sep 28 12:48:28 2009 +0900 | |
+++ b/yahtml.el Wed Mar 02 16:55:11 2011 -1000 | |
@@ -880,7 +880,9 @@ | |
(if (string= form "") (setq form yahtml-last-form)) | |
(setq yahtml-last-form form) | |
(if yahtml-prefer-upcases (setq form (upcase form))) | |
- (insert (format "<%s%s>" form (yahtml-addin form))) | |
+ (insert (format "<%s%s%s>" form (yahtml-addin form) | |
+ (if (and yahtml-need-single-closer | |
+ (cdr (assoc form yahtml-form-table))) "" " /"))) | |
;;(indent-relative-maybe) | |
(if (cdr (assoc form yahtml-form-table)) | |
(save-excursion (insert (format "</%s>" form)))) | |
@@ -1641,8 +1643,9 @@ | |
(insert (format "<%s%s%s>" | |
cmd | |
(yahtml-addin cmd) | |
- (if (and yahtml-need-single-closer | |
- (assoc cmd '(("br")("hr")))) | |
+ (if yahtml-need-single-closer | |
+ ;; (and yahtml-need-single-closer | |
+ ;; (assoc cmd '(("br")("hr")))) | |
" /" ""))) | |
(if (assoc cmd yahtml-env-table) | |
(save-excursion (insert (format "</%s>" cmd))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
と設定しておくと、空タグは
<tag/>
の形で出力するようになります。