From da71a23bc05a78c15683784566bbc9baa286c695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonc=CC=A7alo=20Silva?= Date: Tue, 6 Mar 2012 16:36:42 +0000 Subject: [PATCH] Don't add sh_LANG class to pre elements when there is no LANG. --- lib/showoff.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/showoff.rb b/lib/showoff.rb index 5427cdd01..d61e3faa8 100644 --- a/lib/showoff.rb +++ b/lib/showoff.rb @@ -300,7 +300,7 @@ def update_commandline_code(slide) lines = out.split("\n") if lines.first.strip[0, 3] == '@@@' lang = lines.shift.gsub('@@@', '').strip - pre.set_attribute('class', 'sh_' + lang.downcase) + pre.set_attribute('class', 'sh_' + lang.downcase) if !lang.empty? code.content = lines.join("\n") end end