aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/editing.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-03-02 18:24:43 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2020-03-02 18:24:43 -0500
commite3b22735816c76f915817e54251da574a95c5fd5 (patch)
treeb91174a6abc7d8e4933bbe0baad87bba4a6fd5bc /modules/textadept/editing.lua
parent28b4a90aa7609d7a37cd2c32eef97ba4be112084 (diff)
downloadtextadept-e3b22735816c76f915817e54251da574a95c5fd5.tar.gz
textadept-e3b22735816c76f915817e54251da574a95c5fd5.zip
Trim spaces when running filter through commands.
Diffstat (limited to 'modules/textadept/editing.lua')
-rw-r--r--modules/textadept/editing.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index b27d9fea..125db11c 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -611,7 +611,7 @@ function M.filter_through(command)
}), command)
local output = buffer.target_text
for i = 1, #commands do
- local p = assert(os.spawn(commands[i]))
+ local p = assert(os.spawn(commands[i]:match('^%s*(.-)%s*$')))
p:write(output)
p:close()
output = p:read('a') or ''