mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 23:14:55 +02:00
Clean up url excluded chars PR
This commit is contained in:
@@ -12,11 +12,17 @@ bool is_P_category(char_type);
|
||||
char_type codepoint_for_mark(combining_type m);
|
||||
combining_type mark_for_codepoint(char_type c);
|
||||
|
||||
static inline bool
|
||||
is_excluded_from_url(uint32_t ch) {
|
||||
for (size_t i = 0; i < OPT(url_excluded_characters_count); i++) {
|
||||
if (ch == OPT(url_excluded_characters)[i]) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
is_url_char(uint32_t ch) {
|
||||
for (size_t i = 0; i < OPT(url_excluded_characters_count); i++)
|
||||
if (ch == OPT(url_excluded_characters)[i]) return false;
|
||||
return ch && !is_CZ_category(ch);
|
||||
return ch && !is_CZ_category(ch) && !is_excluded_from_url(ch);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
|
||||
Reference in New Issue
Block a user