From 6d657a86cfe592b25b1ad88e4c6e8a0c861c338c Mon Sep 17 00:00:00 2001 From: Etoh Date: Wed, 27 Dec 2017 15:33:34 +0000 Subject: [PATCH] Fix lua intf {}\ escape issues --- resources/syncplayintf.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/syncplayintf.lua b/resources/syncplayintf.lua index 5b5bfa3..fb2301a 100644 --- a/resources/syncplayintf.lua +++ b/resources/syncplayintf.lua @@ -555,8 +555,13 @@ function wordwrapify_string(line) nextChar = next_utf8(str, currentChar) if nextChar == currentChar then return newstr - end - newstr = newstr .. WORDWRAPIFY_MAGICWORD .. str:sub(currentChar,nextChar-1) + end + charToTest = str:sub(currentChar,nextChar-1) + if charToTest ~= "\\" and charToTest ~= "{" and charToTest ~= "}" then + newstr = newstr .. WORDWRAPIFY_MAGICWORD .. str:sub(currentChar,nextChar-1) + else + newstr = newstr .. str:sub(currentChar,nextChar-1) + end currentChar = nextChar until currentChar > maxChars return newstr