mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-03 04:31:36 +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 nextChar = 0
|
||||||
local chars = 0
|
local chars = 0
|
||||||
local maxChars = str:len()
|
local maxChars = str:len()
|
||||||
|
str = string.gsub(str, "\\\"", "\"");
|
||||||
repeat
|
repeat
|
||||||
nextChar = next_utf8(str, currentChar)
|
nextChar = next_utf8(str, currentChar)
|
||||||
if nextChar == currentChar then
|
if nextChar == currentChar then
|
||||||
return newstr
|
return newstr
|
||||||
end
|
end
|
||||||
local charToTest = str:sub(currentChar,nextChar-1)
|
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)
|
newstr = newstr .. WORDWRAPIFY_MAGICWORD .. str:sub(currentChar,nextChar-1)
|
||||||
else
|
else
|
||||||
newstr = newstr .. str:sub(currentChar,nextChar-1)
|
newstr = newstr .. str:sub(currentChar,nextChar-1)
|
||||||
|
Loading…
Reference in New Issue
Block a user