]> Pileus Git - vpaste/commitdiff
move trim to end
authorAndy Spencer <andy753421@gmail.com>
Wed, 1 Jun 2011 06:46:24 +0000 (06:46 +0000)
committerAndy Spencer <andy753421@gmail.com>
Wed, 1 Jun 2011 06:46:24 +0000 (06:46 +0000)
index.cgi

index 939bf728d418f243639e7a25a16dc867159bbf85..f1b8b15c0a99533fa6fcc59dde43912448c9f1ed 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -87,7 +87,7 @@ function do_print {
                # Create a temp file with the provided modeline
                output="$(mktemp)"
                tmp="$(mktemp)"
-               sed "1a$(get_modeline)" "$input" > "$tmp"
+               sed "\$a$(get_modeline)" "$input" > "$tmp"
 
                # - I have some plugins in ~/.vim
                # - Run ex in screen to trick it into thinking that it
@@ -99,7 +99,7 @@ function do_print {
                        '+sil! set iconstring= ruf= stl= tal=' \
                        "+sil! set titlestring=$1\ -\ vpaste.net" \
                        '+sil! set noml'     \
-                       '+sil! 2d|'$trim     \
+                       '+sil! $d|'$trim     \
                        '+sil! %s/\r//g' \
                        '+sil! TOhtml'       \
                        "+sav! $output" \