Commit Diff


commit - e6ed7975c2c26e4f4f870083e5b9f77d8abc7518
commit + fda29a7cf2e3dad43c973fbaa93c3affffabe845
blob - 9df578d621d4569af579205413567aab897d2467
blob + af8b8ac83fb7f372ba6b6818683aad9fab25bac6
--- gc
+++ gc
@@ -7,16 +7,32 @@
 		pre = 1
 		print "```"
 	}
+	emptylines()
 	print substr($0, 2)
 	next
 }
 
+/^$/ {
+	if (pre)
+		empty++
+	else
+		print $0
+	next
+}
+
 // {
 	if (pre) {
 		pre = 0
 		print "```"
 	}
+	emptylines()
 	print $0
 }
 
 END { if (pre) print "```" }
+
+function emptylines() {
+	for (i = 0; i < empty; i++)
+		print ""
+	empty = 0
+}