aboutsummaryrefslogtreecommitdiffstats
path: root/src/html-abbrev.el
diff options
context:
space:
mode:
Diffstat (limited to 'src/html-abbrev.el')
-rw-r--r--src/html-abbrev.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/html-abbrev.el b/src/html-abbrev.el
index b51e8d9..bb2b122 100644
--- a/src/html-abbrev.el
+++ b/src/html-abbrev.el
@@ -424,6 +424,9 @@
"Function to execute when expanding a leaf node in the
Emmet AST.")
+(defvar emmet-expand-jsx-className? nil
+ "Wether to use `className' when expanding `.classes'")
+
(emmet-defparameter
emmet-tag-settings-table
(gethash "tags" (gethash "html" emmet-preferences)))
@@ -547,7 +550,10 @@
(puthash tag-name fn emmet-tag-snippets-table)))
(let* ((id (emmet-concat-or-empty " id=\"" tag-id "\""))
- (classes (emmet-mapconcat-or-empty " class=\"" tag-classes " " "\""))
+ (class-attr (if emmet-expand-jsx-className?
+ " className=\""
+ " class=\""))
+ (classes (emmet-mapconcat-or-empty class-attr tag-classes " " "\""))
(props (let* ((tag-props-default
(and settings (gethash "defaultAttr" settings)))
(merged-tag-props