From a73ec000f4d3d85ee9e1c1f36412109823a67597 Mon Sep 17 00:00:00 2001 From: Jake Scruggs Date: Wed, 2 Mar 2011 12:27:21 -0600 Subject: [PATCH] Syntax highlighting is now optional --- lib/base/configuration.rb | 1 + lib/templates/awesome/awesome_template.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/base/configuration.rb b/lib/base/configuration.rb index 2a53ce9e2..e21fd18ca 100644 --- a/lib/base/configuration.rb +++ b/lib/base/configuration.rb @@ -150,6 +150,7 @@ def reset @graph_engine = :bluff # can be :bluff or :gchart @darwin_txmt_protocol_no_thanks = false + @syntax_highlighting = true #Can be set to false to avoid UTF-8 issues with Ruby 1.9.2 and Syntax 1.0 end # Perform a simple check to try and guess if we're running diff --git a/lib/templates/awesome/awesome_template.rb b/lib/templates/awesome/awesome_template.rb index 01a0d87b9..b11dc0137 100644 --- a/lib/templates/awesome/awesome_template.rb +++ b/lib/templates/awesome/awesome_template.rb @@ -56,7 +56,8 @@ def write_file_data out << " " end out << "" - out << "#{convertor.convert(line)}" + line_for_display = MetricFu.configuration.syntax_highlighting ? convertor.convert(line) : line + out << "#{line_for_display}" out << "" end out << ""