[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 908d55b 170/346: fix #49 - Occasional incorrect fon
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 908d55b 170/346: fix #49 - Occasional incorrect fontification of string literals due |
Date: |
Sun, 29 Aug 2021 11:00:23 -0400 (EDT) |
branch: elpa/d-mode
commit 908d55b24e7138195fbe3e2af1171efea2c6d4cd
Author: Martin Nowak <code@dawg.eu>
Commit: Martin Nowak <code@dawg.eu>
fix #49 - Occasional incorrect fontification of string literals due
- the regex that marked backslashes in wysiwyg strings as punctuation
was trying to only match wysiwyg strings that actually contained a
backslash
- this could lead to an off-by-one error matching the end of one
wysiwyg string and the beginning of a suceeding wysiwyg string
(see https://regex101.com/r/yqdATM/1/)
- fixed by simply matching all wysiwyg strings and optionally marking
contained backslashes as punctuation
---
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 <russel@winder.org.uk>
;; Vladimir Panteleev <vladimir@thecybershadow.net>
;; 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>;
+}
- [nongnu] elpa/d-mode 23a3661 119/346: Merge pull request #72 from nordlow/fix-d-exceptions-regexp, (continued)
- [nongnu] elpa/d-mode 23a3661 119/346: Merge pull request #72 from nordlow/fix-d-exceptions-regexp, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e5d21be 121/346: README: Update shield images and links to use official project repository, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 576dd29 123/346: tests: Actually test compilation-mode error list correctness, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 7817dbc 122/346: d-mode-test: Announce mismatched values of inline tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8ccad32 136/346: Simplify cascaded call indentation setup, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0b8ed61 152/346: Fix highlighting of const variable declarations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 593e3f5 155/346: Fix extern(C) functions omitted from imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 93a62b3 158/346: Fix imenu for functions returning types containing parens, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a4f0b2d 161/346: Fix imenu for functions prefixed with a version/else, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8771a86 162/346: Convert d-imenu-generic-expression to rx, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 908d55b 170/346: fix #49 - Occasional incorrect fontification of string literals due,
ELPA Syncer <=
- [nongnu] elpa/d-mode dea775a 066/346: Merge pull request #35 from wrzoski/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 01997e0 070/346: Add LDC compiler message pattern to be recognized in compilation mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 38ddb5a 076/346: Merge pull request #41 from dmakarov/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2b0b84f 073/346: Merge pull request #38 from TOGoS/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c4d8ba8 099/346: Fix omission of final/abstract classes in imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 9729d5f 103/346: Merge pull request #62 from CyberShadow/pull-20160328-152551, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2d014ef 106/346: Add .cask to .gitignore., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 830a070 095/346: Merge pull request #51 from dmakarov/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b682601 118/346: Document cl compilation warning, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode efc92aa 120/346: tests: Add test for GitHub pull request #72, ELPA Syncer, 2021/08/29