Branch: refs/heads/master Author: Skif-off Skif-off@users.noreply.github.com Committer: GitHub noreply@github.com Date: Tue, 09 Jan 2018 00:02:24 UTC Commit: 23e563337611fb0087679c36fb0e91472e865bb5 https://github.com/geany/geany-plugins/commit/23e563337611fb0087679c36fb0e91...
Log Message: ----------- GeanyLua: Fix right-trim.lua
Now script works with files with CRLF too
Modified Paths: -------------- geanylua/examples/edit/right-trim.lua
Modified: geanylua/examples/edit/right-trim.lua 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -5,9 +5,9 @@
local s=geany.text()
-if (s and string.match(s, "[ \t]\n") ) +if (s and string.match(s, "[ \t][\r\n]") ) then - geany.text(string.gsub(s,"[ \t]+\n", "\n")) + geany.text(string.gsub(s,"([ \t]+)([\r\n]+)", "%2")) else geany.message("Right trim:", "Match not found.") end
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org