mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-02 20:21:55 +00:00
Fix error with double quotes in mpv chat messages (#329)
This commit is contained in:
parent
dac06715f5
commit
1ad10632c6
@ -626,14 +626,14 @@ function wordwrapify_string(line)
|
||||
local nextChar = 0
|
||||
local chars = 0
|
||||
local maxChars = str:len()
|
||||
|
||||
str = string.gsub(str, "\\\"", "\"");
|
||||
repeat
|
||||
nextChar = next_utf8(str, currentChar)
|
||||
if nextChar == currentChar then
|
||||
return newstr
|
||||
end
|
||||
local charToTest = str:sub(currentChar,nextChar-1)
|
||||
if charToTest ~= "\\" and charToTest ~= "{" and charToTest ~= "}" and charToTest ~= "%" then
|
||||
if charToTest ~= "{" and charToTest ~= "}" and charToTest ~= "%" then
|
||||
newstr = newstr .. WORDWRAPIFY_MAGICWORD .. str:sub(currentChar,nextChar-1)
|
||||
else
|
||||
newstr = newstr .. str:sub(currentChar,nextChar-1)
|
||||
|
Loading…
Reference in New Issue
Block a user