branch: elpa/web-mode
commit b0606702fe96bfaf5f7c9078fc55e513c9d335bf
Author: ncaq <[email protected]>
Commit: ncaq <[email protected]>

    fixed: support multi line comment
---
 web-mode.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/web-mode.el b/web-mode.el
index e908fdd8c2..d4a5853473 100644
--- a/web-mode.el
+++ b/web-mode.el
@@ -10936,7 +10936,14 @@ Prompt user if TAG-NAME isn't provided."
      (t
       (newline 1)
       (indent-line-to (plist-get ctx :col))
-      (insert (concat (plist-get ctx :prefix) " ")))
+      (let ((prefix (plist-get ctx :prefix)))
+        (insert
+         (concat prefix
+                 ;; Check if the comment ends with a space, and if not, insert 
one.
+                 (if
+                     (string-equal (substring prefix -1 (length prefix)) " ")
+                     ""
+                   " ")))))
      ) ;cond
     ))
 

Reply via email to