Permalink
Browse files

• when used with a multi-line selection, add newlines around the inse…

…rted markers

git-svn-id: http://svn.textmate.org/trunk/Bundles/Source.tmbundle@9779 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent bb7cf57 commit 8c844ac719977cd3f0d928bbdc45a0733140ba5d @sorbits sorbits committed May 29, 2008
Showing with 6 additions and 1 deletion.
  1. +6 −1 Commands/Insert Block Comment.tmCommand
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
@@ -21,6 +21,11 @@ end
start, stop = find_markers
input = STDIN.read.to_s
+if input =~ /\n/
+ start &lt;&lt; "\n"
+ stop &lt;&lt; "\n"
+end
+
STDOUT &lt;&lt; e_sn(start) &lt;&lt; (input.empty? ? "\n\t$0\n" : e_sn(input)) &lt;&lt; e_sn(stop)
</string>
<key>fallbackInput</key>

0 comments on commit 8c844ac

Please sign in to comment.