summaryrefslogtreecommitdiff
path: root/syntax.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-02 14:10:38 -0500
committerpommicket <pommicket@gmail.com>2023-01-02 14:10:38 -0500
commitf791aa01fad7e81223808584212c6a1a4c80ca07 (patch)
treef93d53a62035cdad7f16b97fb28c83c7acfaf14f /syntax.c
parentc0d0117a963cf8e4dfb28b919087d8a8ecbbca6e (diff)
finish restructuring
Diffstat (limited to 'syntax.c')
-rw-r--r--syntax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/syntax.c b/syntax.c
index 3d8c34f..7526f62 100644
--- a/syntax.c
+++ b/syntax.c
@@ -1253,7 +1253,7 @@ static void syntax_highlight_javascript_like(
// this is not foolproof for detecting regex literals
// but should handle all "reasonable" uses of regex.
bool is_regex = i == 0 // slash is first char in line
- || (line[i-1] <= WCHAR_MAX && iswspace((wint_t)line[i-1])) // slash preceded by space
+ || is32_space(line[i-1]) // slash preceded by space
|| (line[i-1] <= 128 && strchr(";({[=,:", (char)line[i-1])); // slash preceded by any of these characters
if (is_regex) {
in_string = true;