summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-07-28 13:43:57 +0300
committeravih <avih@users.noreply.github.com>2021-07-30 09:52:34 +0300
commit8b1930fbd69d5d911f38918cdd5c6936b8941b0e (patch)
treed349ff237bd8b566f4e08f3e1e65f4c67a61a416 /player/lua
parent9f6cbf3a4d0b994f0ab42d59479f48cc7b4f8923 (diff)
downloadmpv-8b1930fbd69d5d911f38918cdd5c6936b8941b0e.tar.bz2
mpv-8b1930fbd69d5d911f38918cdd5c6936b8941b0e.tar.xz
stats.lua: page 4 (keys): detect single-quotes
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/stats.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index 7883583461..2c906a6e32 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -386,10 +386,10 @@ local name_prefixes = {
-- It's decent in practice, and worst case is "incorrect" subject.
local function cmd_subject(cmd)
cmd = cmd:gsub(";.*", ""):gsub("%-", "_") -- only first cmd, s/-/_/
- local TOKEN = '^%s*"?([%w_!]*)' -- captures+ends before a (maybe) final "
+ local TOKEN = '^%s*["\']?([%w_!]*)' -- captures+ends before (maybe) final "
local tok, sname, subw
- repeat tok, cmd = cmd:match(TOKEN .. '"?(.*)')
+ repeat tok, cmd = cmd:match(TOKEN .. '["\']?(.*)')
until not cmd_prefixes[tok]
-- tok is the 1st non-generic command/property name token, cmd is the rest