diff options
author | 2020-03-02 18:24:43 -0500 | |
---|---|---|
committer | 2020-03-02 18:24:43 -0500 | |
commit | e3b22735816c76f915817e54251da574a95c5fd5 (patch) | |
tree | b91174a6abc7d8e4933bbe0baad87bba4a6fd5bc /modules/textadept | |
parent | 28b4a90aa7609d7a37cd2c32eef97ba4be112084 (diff) | |
download | textadept-e3b22735816c76f915817e54251da574a95c5fd5.tar.gz textadept-e3b22735816c76f915817e54251da574a95c5fd5.zip |
Trim spaces when running filter through commands.
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/editing.lua | 2 |
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 '' |