emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/dart-mode d5776f1 172/192: Fixes fontification of small st


From: ELPA Syncer
Subject: [nongnu] elpa/dart-mode d5776f1 172/192: Fixes fontification of small strings containing only backslashes
Date: Sun, 29 Aug 2021 11:02:12 -0400 (EDT)

branch: elpa/dart-mode
commit d5776f1e9bfeb45eb30723eba3030691a8491545
Author: Brady Trainor <mail@bradyt.com>
Commit: Brady Trainor <mail@bradyt.com>

    Fixes fontification of small strings containing only backslashes
---
 dart-mode.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dart-mode.el b/dart-mode.el
index 8406b0f..a75b1fc 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -737,9 +737,10 @@ strings."
       (put-text-property bos (1+ bos) 'syntax-table (string-to-syntax "|") nil)
       ;; Look for the end of string delimiter, depending on rawp and
       ;; string-delimiter
-      (when (or (looking-at string-delimiter)
-                ;; Unless rawp, ensure an even number of backslashes
-                (re-search-forward (concat (if rawp "" (rx (not (any ?\\)) 
(zero-or-more ?\\ ?\\)))
+      ;; Unless rawp, ensure an even number of backslashes
+      (when (or (looking-at (concat (unless rawp (rx (zero-or-more ?\\ ?\\)))
+                                    string-delimiter))
+                (re-search-forward (concat (unless rawp (rx (not (any ?\\)) 
(zero-or-more ?\\ ?\\)))
                                            string-delimiter)
                                    end t))
         (let ((eos (match-end 0)))



reply via email to

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