branch: elpa/zig-mode
commit 0a150f20ece9e7a7d30ce5a24ef0b3c9c917435b
Merge: 64994f1 67ad48b
Author: Andrea Orru <and...@orru.io>
Commit: GitHub <nore...@github.com>

    Merge pull request #19 from mgxm/fix_multiline_string
    
    fix multiline string properties rules regex
---
 zig-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/zig-mode.el b/zig-mode.el
index 6e829a5..f4fadd1 100644
--- a/zig-mode.el
+++ b/zig-mode.el
@@ -268,7 +268,9 @@
   (funcall
    (syntax-propertize-rules
     ;; Multiline strings
-    ("\\(\\\\\\)\\\\"
+    ;; Do not match backslashes that are preceded by single or
+    ;; double-quotes.
+    ("[^\\'\"]c?\\(\\\\\\)\\\\"
      (1 (prog1 "|"
           (goto-char (match-end 0))
           (zig-syntax-propertize-to-newline-if-in-multiline-str end)))))

Reply via email to