diff options
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | syntax.c | 5 |
2 files changed, 7 insertions, 0 deletions
@@ -1,4 +1,6 @@ /* +TODO: +- windows UI scaling FUTURE FEATURES: - autodetect indentation (tabs vs spaces) - font setting & support for multiple fonts to cover more characters @@ -1404,6 +1404,11 @@ static void syntax_highlight_javascript_like( is_regex = false; } + if (i + 1 < line_len && line[i+1] == '>') { + // slash is followed by equals, so this might be a self-closing JSX tag + is_regex = false; + } + if (is_regex) { in_string = true; string_is_regex = true; |