From 896ad5c758ed33905b79c98dc5759d0f5675eb37 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 28 Sep 2025 00:15:08 -0400 Subject: Allow - and a few other things in HTML tag names --- main.c | 1 - syntax.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 1cbbf67..3c2cd98 100644 --- a/main.c +++ b/main.c @@ -1,7 +1,6 @@ /* TODO: - syntax highlighting for Python t-strings -- fix html highlighting - don't autocomplete when tab is pressed if there is text selected - highlight correctly in Markdown - highlight (https://example.org) correctly in Markdown (exactly which characters are allowed in links?) diff --git a/syntax.c b/syntax.c index 9c6f24d..07e0dfb 100644 --- a/syntax.c +++ b/syntax.c @@ -1215,7 +1215,8 @@ static void syntax_highlight_markdown(SyntaxState *state, const char32_t *line, } static bool is_html_tag_char(char32_t c) { - return c == '<' || c == '/' || c == '!' || c == ':' || is32_alnum(c); + return c == '<' || c == '/' || c == '!' || c == ':' || c == '-' || c == '.' || c == '_' || c >= 0x80 + || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'); } // highlights XML and HTML -- cgit v1.2.3