From: Michael D. Lowis Date: Sat, 8 Jul 2017 14:30:19 +0000 (-0400) Subject: fixed bug where syntax highlighter continues to run even when no language is selected X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=385014ce5371308a5e4db55a03050a960364c6c1;p=projs%2Ftide.git fixed bug where syntax highlighter continues to run even when no language is selected --- diff --git a/tide-hl.rb b/tide-hl.rb index 3b81328..92e0086 100755 --- a/tide-hl.rb +++ b/tide-hl.rb @@ -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