aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-04-29 00:59:29 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-05-02 20:40:08 -0400
commit28ad7b5026d731a832bf60ba4c497c9e3d97e9ff (patch)
tree3b8ba5b0ce69d0e64bd2616ced586e6d2deb1966
parent1c2c90ab0720784473805d20c359499a2d3d2ccf (diff)
downloadrneovim-28ad7b5026d731a832bf60ba4c497c9e3d97e9ff.tar.gz
rneovim-28ad7b5026d731a832bf60ba4c497c9e3d97e9ff.tar.bz2
rneovim-28ad7b5026d731a832bf60ba4c497c9e3d97e9ff.zip
scripts/legacy2luatest.pl: remove modeline #2536
Several legacy tests have "vim: set ft=vim" modelines which causes the new lua file to be opened with filetype=vim.
-rwxr-xr-xscripts/legacy2luatest.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/legacy2luatest.pl b/scripts/legacy2luatest.pl
index 1a3f54146e..ebd8dad1e1 100755
--- a/scripts/legacy2luatest.pl
+++ b/scripts/legacy2luatest.pl
@@ -83,6 +83,10 @@ sub read_in_file {
# If not an empty line, emit as Lua comment.
if (!/^$/) {
+ # Remove modeline
+ s/vim:.*set f\w+=vim//g;
+ # Remove trailing ":"
+ s/\s*:\s*$//g;
push @description_lines, '-- ' . $_;
}