Allow send Add ## in chat (#1617)

Resolves #1615.
This commit is contained in:
archbirdplus 2025-06-08 02:19:16 -07:00 committed by GitHub
parent bf7d20f11e
commit 27ef22e21a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -741,7 +741,7 @@ pub const TextBuffer = struct { // MARK: TextBuffer
var unicodeIterator = std.unicode.Utf8Iterator{.bytes = text, .i = 0};
var count: usize = 0;
var curChar = unicodeIterator.nextCodepoint() orelse return count;
while(true) switch(curChar) {
outer: while(true) switch(curChar) {
'*' => {
curChar = unicodeIterator.nextCodepoint() orelse break;
},
@ -767,7 +767,7 @@ pub const TextBuffer = struct { // MARK: TextBuffer
count += 1;
},
'#' => {
for(0..7) |_| curChar = unicodeIterator.nextCodepoint() orelse break;
for(0..7) |_| curChar = unicodeIterator.nextCodepoint() orelse break :outer;
},
'§' => {
curChar = unicodeIterator.nextCodepoint() orelse break;