Skip to content

Commit 5bfd3d2

Browse files
committed
Fix fontification of namespaces in using-statements.
Namespaces can add with numbers (like SomeContract.v3). Update tests.
1 parent 79e0a60 commit 5bfd3d2

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

csharp-mode-tests.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
"Reference" 'font-lock-constant-face
122122
"Under_scored" 'font-lock-constant-face
123123
"WithNumbers09.Ok" 'font-lock-constant-face
124+
"WithNumbers09.OkV2" 'font-lock-constant-face
124125
))
125126

126127
(ert-deftest fontification-of-namespace-statements ()
@@ -129,6 +130,7 @@
129130
"Reference" 'font-lock-constant-face
130131
"Under_scored" 'font-lock-constant-face
131132
"WithNumbers09.Ok" 'font-lock-constant-face
133+
"WithNumbers09.OkV2" 'font-lock-constant-face
132134
))
133135

134136
(defun list-repeat-once (mylist)

csharp-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ to work properly with code that includes attributes."
773773
"[ \t\n\f\v\r]*="
774774
"[ \t\n\f\v\r]*"
775775
"\\)?"
776-
"\\(\\(?:[A-Za-z0-9_]+\\.\\)*[A-Za-z_]+\\)"
776+
"\\(\\(?:[A-Za-z0-9_]+\\.\\)*[A-Za-z0-9_]+\\)"
777777
"[ \t\n\f\v\r]*;")
778778
(2 font-lock-constant-face t t)
779779
(3 font-lock-constant-face))

test-files/namespace-fontification.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ namespace Reference {
55
namespace Under_Scored {
66

77
}
8+
9+
namespace WithNumbers09.Ok {
10+
11+
}
12+
13+
namespace WithNumbers09.OkV2 {
14+
15+
}

test-files/using-fontification.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
using Reference;
22
using Under_scored;
33
using WithNumbers09.Ok;
4+
using WithNumbers09.OkV2;

0 commit comments

Comments
 (0)