Skip to content

Commit 8bbe3b3

Browse files
committed
Remove Zero Width Space characters
1 parent f3c7b05 commit 8bbe3b3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

wocchat/wocchat.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ local text = require("text")
3030
local unicode = require("unicode")
3131
local process = require("process")
3232

33+
local unicodeBlacklist = unicode.char(0x200B,0xFEFF)
34+
3335
local args, options = shell.parse(...)
3436

3537
local config,blocks,persist = {},{{type="main",name="WocChat",text={{"*","Welcome to WocChat!"}}},active=1},{}
@@ -369,7 +371,7 @@ local function drawWindow(x,width,height,irctext)
369371
local buffer = {}
370372
for i = 1,#irctext do
371373
local first = true
372-
local line = irctext[i][2]:gsub("[\2\29\31]",""):gsub("\15+","\15")
374+
local line = irctext[i][2]:gsub("[\2\29\31" .. unicodeBlacklist .. "]",""):gsub("\15+","\15")
373375
if not config.wocchat.showcolors or gpu.getDepth() < 8 then
374376
line = table.concat(colorChunker(line,true),"")
375377
end

0 commit comments

Comments
 (0)