URL detection: Fix IPv6 hostnames breaking URL detection

Fixes #7565
This commit is contained in:
Kovid Goyal
2024-06-21 05:53:21 +05:30
parent b63e523098
commit 1a38b60463
5 changed files with 66 additions and 22 deletions

View File

@@ -89,8 +89,8 @@ void line_set_char(Line *, unsigned int , uint32_t , unsigned int , Cursor *, hy
void line_right_shift(Line *, unsigned int , unsigned int );
void line_add_combining_char(CPUCell *, GPUCell *, uint32_t , unsigned int );
index_type line_url_start_at(Line *self, index_type x);
index_type line_url_end_at(Line *self, index_type x, bool, char_type, bool);
bool line_startswith_url_chars(Line*);
index_type line_url_end_at(Line *self, index_type x, bool, char_type, bool, bool, index_type);
bool line_startswith_url_chars(Line*, bool);
bool line_as_ansi(Line *self, ANSIBuf *output, const GPUCell**, index_type start_at, index_type stop_before, char_type prefix_char) __attribute__((nonnull));
unsigned int line_length(Line *self);
size_t cell_as_unicode(CPUCell *cell, bool include_cc, Py_UCS4 *buf, char_type);