[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode 3082066 185/192: Don't font lock anchor in a str
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode 3082066 185/192: Don't font lock anchor in a string |
Date: |
Sun, 29 Aug 2021 11:02:14 -0400 (EDT) |
branch: elpa/dart-mode
commit 3082066d93ca9177fa42404cc50e98ddd6d56bf6
Author: Brady Trainor <mail@bradyt.net>
Commit: Brady Trainor <mail@bradyt.net>
Don't font lock anchor in a string
---
dart-mode.el | 5 +++--
test/test.el | 9 +++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dart-mode.el b/dart-mode.el
index 445ee00..bdd8b2f 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -334,9 +334,10 @@ For example, \"height\" in \"const int height\" would be
matched."
'("bool" "double" "dynamic" "int" "num" "void"
"var"
"get" "set")))
- (set-match-data (list beg end))
(goto-char end)
- (throw 'result t))
+ (unless (nth 3 (syntax-ppss))
+ (set-match-data (list beg end))
+ (throw 'result t)))
(goto-char (match-end 1)))
(throw 'result nil))))
diff --git a/test/test.el b/test/test.el
index a6e1c84..d37bda1 100644
--- a/test/test.el
+++ b/test/test.el
@@ -34,3 +34,12 @@
(ert-deftest dart-font-lock-named-constructors-test ()
:expected-result :failed
(should (dart-font-lock-test-apps "faceup/issues/named-constructors.dart")))
+
+(defun dart-font-lock-test (faceup)
+ (faceup-test-font-lock-string 'dart-mode faceup))
+(faceup-defexplainer dart-font-lock-test)
+
+(ert-deftest dart-font-lock-declared-identifier-anchors ()
+ "Simple Dart font-lock tests."
+ (should (dart-font-lock-test "«k:var» «v:a», «v:b»;"))
+ (should (dart-font-lock-test "group(«s:\"WordCount: Ignore special
characters - \"», ignoreSpecialCharacters);")))
- [nongnu] elpa/dart-mode b4e592f 098/192: Add more search commands, (continued)
- [nongnu] elpa/dart-mode b4e592f 098/192: Add more search commands, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c172f19 106/192: Support completing multiple parameters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 2b085f5 125/192: Do not fail if Flycheck is not available. (#52), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c973dea 127/192: Require ‘help-mode’., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 68f7f4f 132/192: Require cl for emacs 24.4, 24.5, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode caa7a19 124/192: Don't error out with revert-buffer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 199709f 148/192: Removes cc-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode da244c6 144/192: Fixes no such file or directory, dartfmt.exe, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 9db2679 143/192: Fixes invalid file path format on Windows, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 06e2d4b 160/192: Respect font-lock-maximum-decoration, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 3082066 185/192: Don't font lock anchor in a string,
ELPA Syncer <=
- [nongnu] elpa/dart-mode ad93bc1 165/192: Edit headers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode f6a1c9a79 171/192: Fix byte-compiling errors and warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1273ccb 191/192: Make changes to list of dart-mode keywords easier to diff, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a9899a9 182/192: Fontify abstract methods, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c523992 004/192: Handle map indentation with identifiers., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 30f9326 007/192: Make constants better., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 5ce38b7 009/192: Add a couple known bugs., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 64a573f 010/192: Require 'cl when compiling., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode b42c2ca 014/192: Another known bug., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 4d67ba8 017/192: Fix the closing comment., ELPA Syncer, 2021/08/29