fix: title deduplication matching not escaping pattern parameter
ref #455
This commit is contained in:
@@ -101,7 +101,8 @@ function TopBar:decide_titles()
|
||||
longer_title, shorter_title = self.main_title, self.alt_title
|
||||
end
|
||||
|
||||
if string.match(longer_title --[[@as string]], shorter_title --[[@as string]]) then
|
||||
local escaped_shorter_title = string.gsub(shorter_title --[[@as string]], "[%(%)%.%+%-%*%?%[%]%^%$%%]", "%%%1")
|
||||
if string.match(longer_title --[[@as string]], escaped_shorter_title) then
|
||||
self.main_title, self.alt_title = longer_title, nil
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user