]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed bug where syntax highlighter continues to run even when no language is selected
authorMichael D. Lowis <mike@mdlowis.com>
Sat, 8 Jul 2017 14:30:19 +0000 (10:30 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Sat, 8 Jul 2017 14:30:19 +0000 (10:30 -0400)
tide-hl.rb

index 3b813281c7d8cbd7861c7bc9c3cf68ae66d58639..92e0086aec6afe3403487751fa9d421846c500b1 100755 (executable)
@@ -153,6 +153,10 @@ end
 
 #-------------------------------------------------------------------------------
 
+# bail if theres nothing to highlight
+if $language.nil? then exit
+
+# otherwise start doing the job
 while (not $stdin.eof?) do
   # Read in the input chunk
   $buf = StringIO.new