emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 ff33053: Fix indentation bug in multi-line CSS se


From: Simen Heggestøyl
Subject: [Emacs-diffs] emacs-26 ff33053: Fix indentation bug in multi-line CSS selectors
Date: Fri, 13 Oct 2017 15:58:24 -0400 (EDT)

branch: emacs-26
commit ff330530123a9e3f6fbb2d0fe52564e4e3d78369
Author: Simen Heggestøyl <address@hidden>
Commit: Simen Heggestøyl <address@hidden>

    Fix indentation bug in multi-line CSS selectors
    
    * lisp/textmodes/css-mode.el (css--colon-inside-selector-p): Fix
    indentation of multi-line CSS selectors that include both a
    pseudo-class and parenthesis.
    
    * test/manual/indent/css-mode.css: Add test for the above change.
---
 lisp/textmodes/css-mode.el      |  2 +-
 test/manual/indent/css-mode.css | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 9022ab7..39885c1 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1149,7 +1149,7 @@ This function is intended to be good enough to help SMIE 
during
 tokenization, but should not be regarded as a reliable function
 for determining whether point is within a selector."
   (save-excursion
-    (re-search-forward "[{};)]" nil t)
+    (re-search-forward "[{};]" nil t)
     (eq (char-before) ?\{)))
 
 (defun css--colon-inside-funcall ()
diff --git a/test/manual/indent/css-mode.css b/test/manual/indent/css-mode.css
index bf612b5..640418b 100644
--- a/test/manual/indent/css-mode.css
+++ b/test/manual/indent/css-mode.css
@@ -66,6 +66,16 @@ div::before {
     );
 }
 
+/* Multi-line selector including both a pseudo-class and
+   parenthesis. */
+.form-group:not(.required) label,
+.birth-date .row > * {
+    &::after {
+        display: inline;
+        font-weight: normal;
+    }
+}
+
 @font-face {
     src: url("Sans-Regular.eot") format("eot"),
          url("Sans-Regular.woff") format("woff"),



reply via email to

[Prev in Thread] Current Thread [Next in Thread]