branch: elpa/d-mode
commit 398f1854d53863185e60873b494eec0263bdd0dd
Merge: e64d5fc 908d55b
Author: Vladimir Panteleev <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #85 from MartinNowak/fix49
fix #49 - Occasional incorrect fontification of string literals due
---
d-mode-test.el | 1 +
d-mode.el | 4 ++--
tests/I0049.d | 8 ++++++++
tests/I0049.d.html | 8 ++++++++
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index 808f37f..6fddc64 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -308,6 +308,7 @@ is expected to succeed, and nil otherwise."
(d-test-deftest i0030 "tests/I0030.d" t)
(d-test-deftest i0035 "tests/I0035.d" (version< "24.4" emacs-version))
(d-test-deftest i0039 "tests/I0039.d" (version< "24.4" emacs-version))
+(d-test-deftest i0049 "tests/I0049.d" t)
(d-test-deftest i0064 "tests/I0064.d" t)
(d-test-deftest i0069 "tests/I0069.txt" t)
(d-test-deftest i0072 "tests/I0072.txt" t)
diff --git a/d-mode.el b/d-mode.el
index 94a5c98..95d0ed1 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
;; Maintainer: Russel Winder <[email protected]>
;; Vladimir Panteleev <[email protected]>
;; Created: March 2007
-;; Version: 201610221417
+;; Version: 201802141931
;; Keywords: D programming language emacs cc-mode
;;;; NB Version number is date and time yyyymmddhhMM UTC.
@@ -752,7 +752,7 @@ Key bindings:
(zero-or-more
(not (any "`\\"))))
(minimal-match
- (one-or-more
+ (zero-or-more
(submatch "\\")
(minimal-match
(zero-or-more
diff --git a/tests/I0049.d b/tests/I0049.d
new file mode 100644
index 0000000..fabcce8
--- /dev/null
+++ b/tests/I0049.d
@@ -0,0 +1,8 @@
+// #run: (d-test-fontification)
+
+unittest
+{
+ `beg`;
+ "\"bugbugbug";
+ `end`;
+}
diff --git a/tests/I0049.d.html b/tests/I0049.d.html
new file mode 100644
index 0000000..88dea22
--- /dev/null
+++ b/tests/I0049.d.html
@@ -0,0 +1,8 @@
+<span class="comment-delimiter">// </span><span class="comment">#run:
(d-test-fontification)
+</span>
+<span class="keyword">unittest</span>
+{
+ <span class="string">`beg`</span>;
+ <span class="string">"\"bugbugbug"</span>;
+ <span class="string">`end`</span>;
+}