diff options
author | Shin Aoyama <smihica@gmail.com> | 2016-05-02 03:51:14 +0900 |
---|---|---|
committer | Shin Aoyama <smihica@gmail.com> | 2016-05-02 03:51:14 +0900 |
commit | 355e01a29208d066a52f962fc81075d0fc882b58 (patch) | |
tree | 95a03e7145b55da8e7d9d9e10467ea2d0f743766 /emmet-mode.el | |
parent | 3a29a1ae17271a3dfe3cd47db034ee4036b2b144 (diff) | |
parent | 94361c0ba7a3e454b021306742585e9df44f29ad (diff) | |
download | emmet-mode-355e01a29208d066a52f962fc81075d0fc882b58.tar.lz emmet-mode-355e01a29208d066a52f962fc81075d0fc882b58.tar.xz emmet-mode-355e01a29208d066a52f962fc81075d0fc882b58.zip |
Merge pull request #75 from dochang/custom-self-closing-tags
Add self-closing tags style customization
Diffstat (limited to 'emmet-mode.el')
-rw-r--r-- | emmet-mode.el | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/emmet-mode.el b/emmet-mode.el index 6cf6bd1..5c2bdee 100644 --- a/emmet-mode.el +++ b/emmet-mode.el @@ -207,6 +207,25 @@ to provide proper CSS abbreviations completion." :type 'boolean :group 'emmet) +(defcustom emmet-self-closing-tag-style "/" + "Self-closing tags style. + +This determines how Emmet expands self-closing tags. + +E.g., FOO is a self-closing tag. When expanding \"FOO\": + +When \" /\", the expansion is \"<FOO />\". +When \"/\", the expansion is \"<FOO/>\". +When \"\", the expansion is \"<FOO>\". + +Default value is \"/\". + +NOTE: only \" /\", \"/\" and \"\" are valid." + :type '(choice (const :tag " />" " /") + (const :tag "/>" "/") + (const :tag ">" "")) + :group 'emmet) + (defvar emmet-use-css-transform nil "When true, transform Emmet snippets into CSS, instead of the usual HTML.") (make-variable-buffer-local 'emmet-use-css-transform) @@ -3467,7 +3486,8 @@ tbl)) (block-indentation? (or content-multiline? (and block-tag? content))) (lf (if block-indentation? "\n"))) (concat "<" tag-name id classes props - (if self-closing? "/>" + (if self-closing? + (concat emmet-self-closing-tag-style ">") (concat ">" (if tag-txt (if block-indentation? |