refactor: additional characters for smart_insert
This commit is contained in:
parent
fd3401748e
commit
b4b44ec906
2 changed files with 8 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue