It still have a bug when using string like this:

" teste {{}} teste"
This commit is contained in:
Joao Pasqualini Costa 2013-04-09 17:54:57 -03:00
parent 1415de222c
commit 9bae1b9e25
1 changed files with 1 additions and 1 deletions

View File

@ -466,7 +466,7 @@ function addTabText(text, speaktype, tab, creatureName)
-- Remove the curly braces
for i = 1, #highlightData / 3 do
local dataBlock = { _start = highlightData[(i-1)*3+1], _end = highlightData[(i-1)*3+2], words = highlightData[(i-1)*3+3] }
text = text:gsub("{"..dataBlock.words.."}", dataBlock.words)
text = text:gsub("%{(.-)%}", dataBlock.words, 1)
-- Recalculate positions as braces are removed
highlightData[(i-1)*3+1] = dataBlock._start - ((i-1) * 2)