summaryrefslogtreecommitdiff
path: root/syntax.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-04-20 14:51:50 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2021-04-20 14:51:50 -0400
commita57a9682e74ff3609acb2ca6697fc6fa94c23fb6 (patch)
treebbe848dd7e5c7ae259fbcfdf3253240bc564c8d8 /syntax.c
parentf90d98c3c451aa5be2979ff05863b5aa8bee9336 (diff)
:set-language, various other little things
Diffstat (limited to 'syntax.c')
-rw-r--r--syntax.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/syntax.c b/syntax.c
index bc8803c..19aca34 100644
--- a/syntax.c
+++ b/syntax.c
@@ -870,7 +870,7 @@ static void syntax_highlight_markdown(SyntaxState *state, char32_t const *line,
}
static bool is_html_tag_char(char32_t c) {
- return c == '<' || c == '/' || c == '!' || is32_alnum(c);
+ return c == '<' || c == '/' || c == '!' || c == ':' || is32_alnum(c);
}
static void syntax_highlight_html(SyntaxState *state, char32_t const *line, u32 line_len, SyntaxCharType *char_types) {
@@ -1024,7 +1024,7 @@ static void syntax_highlight_config(SyntaxState *state, char32_t const *line, u3
default: {
if (i == 0) // none of the keywords in syntax_all_keywords_config should appear at the start of the line
break;
- if (is32_ident(line[i - 1]) || !is32_ident(line[i]))
+ if (is32_ident(line[i-1]) || line[i-1] == '-' || !is32_ident(line[i]))
break; // can't be a keyword on its own.
u32 keyword_len = syntax_keyword_len(LANG_CONFIG, line, i, line_len);