refactor: additional characters for smart_insert

This commit is contained in:
Igor Támara 2025-11-17 23:09:40 -05:00 committed by CJ van den Berg
parent fd3401748e
commit b4b44ec906
2 changed files with 8 additions and 1 deletions

View file

@ -41,13 +41,15 @@ pub fn control_code_to_unicode(code: u8) [:0]const u8 {
pub const char_pairs = [_]struct { []const u8, []const u8 }{
.{ "\"", "\"" },
.{ "'", "'" },
.{ "`", "`" },
.{ "(", ")" },
.{ "[", "]" },
.{ "{", "}" },
.{ "", "" },
.{ "", "" },
.{ "", "" },
.{ "«", "»" },
.{ "¿", "?" },
.{ "¡", "!" },
};
pub const open_close_pairs = [_]struct { []const u8, []const u8 }{
@ -57,6 +59,8 @@ pub const open_close_pairs = [_]struct { []const u8, []const u8 }{
.{ "", "" },
.{ "", "" },
.{ "«", "»" },
.{ "¿", "?" },
.{ "¡", "!" },
};
fn raw_byte_to_utf8(cp: u8, buf: []u8) ![]const u8 {