From 28ad7b5026d731a832bf60ba4c497c9e3d97e9ff Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 29 Apr 2015 00:59:29 -0400 Subject: 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. --- scripts/legacy2luatest.pl | 4 ++++ 1 file changed, 4 insertions(+) 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, '-- ' . $_; } -- cgit