hx: attempt to add tests in separate file

This commit is contained in:
Igor Támara 2025-10-06 07:46:54 -05:00 committed by CJ van den Berg
parent b524b97146
commit a64d7c3afa
5 changed files with 273 additions and 2 deletions

View file

@ -2143,11 +2143,11 @@ pub const Editor = struct {
return false;
}
fn is_whitespace(c: []const u8) bool {
pub fn is_whitespace(c: []const u8) bool {
return (c.len == 0) or (c[0] == ' ') or (c[0] == '\t');
}
fn is_whitespace_or_eol(c: []const u8) bool {
pub fn is_whitespace_or_eol(c: []const u8) bool {
return is_whitespace(c) or c[0] == '\n';
}