Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit b78d03a

Browse files
ve-ntjoachimschmidt557
authored andcommitted
Fix block label colorizing
The previous regexp did not handle underscores in the block label, and did not handle block labels longer than one character (excluding the ':'). This commit fixes these issues.
1 parent 0931dcb commit b78d03a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zig-mode.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ If given a SOURCE, execute the CMD on it."
141141
zig-re-optionals-pointers-arrays
142142
(zig-re-grab zig-re-type)))
143143

144-
(defconst zig-re-block-label-open " \\([[:word:]]:\\) *{")
145-
(defconst zig-re-block-label-break "break[[:space:]]*\\(:[[:word:]]+\\)")
144+
(defconst zig-re-block-label-open " \\([[:word:]_]+:\\)[[:space:]]*{")
145+
(defconst zig-re-block-label-break "break[[:space:]]*\\(:[[:word:]_]+\\)")
146146

147147
(defun zig-re-definition (dtype)
148148
"Construct a regular expression for definitions of type DTYPE."

0 commit comments

Comments
 (0)