diff options
author | wm4 <wm4@nowhere> | 2019-12-24 16:04:00 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-12-24 16:04:00 +0100 |
commit | 1d2fcb9227544e29d261a7256f0774d78fd72e60 (patch) | |
tree | faca98b4eb702ad3a4103577f2372db1b433c720 /player/lua | |
parent | 029bb593e7726b75758122ed559b33b7940bd2c7 (diff) | |
download | mpv-1d2fcb9227544e29d261a7256f0774d78fd72e60.tar.bz2 mpv-1d2fcb9227544e29d261a7256f0774d78fd72e60.tar.xz |
console: do not strip leading spaces
As suggested by TheAMM and avih.
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/console.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/player/lua/console.lua b/player/lua/console.lua index 2444f3359d..01377e86ef 100644 --- a/player/lua/console.lua +++ b/player/lua/console.lua @@ -136,6 +136,9 @@ function ass_escape(str) -- Precede newlines with a ZWNBSP to prevent ASS's weird collapsing of -- consecutive newlines str = str:gsub('\n', '\239\187\191\\N') + -- Turn leading spaces into hard spaces to prevent ASS from stripping them + str = str:gsub('\\N ', '\\N\\h') + str = str:gsub('^ ', '\\h') return str end |