diff options
author | pommicket <pommicket@gmail.com> | 2023-07-20 16:44:49 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-07-20 16:44:49 -0400 |
commit | 6148ea652c3e396a12e739a7d84c1a2e46255485 (patch) | |
tree | 5de2fea2a43f02ac533e292a9bf144c6a1a58122 /syntax.c | |
parent | a10edbd6eae2ad1380c12a364cdbe4b57210ebaf (diff) |
fix highlighting of self-closing tags in JSX files
Diffstat (limited to 'syntax.c')
-rw-r--r-- | syntax.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |