Skip to content

Commit

Permalink
Syntax highlighting is now optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Scruggs committed Mar 2, 2011
1 parent 3e26091 commit a73ec00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/base/configuration.rb
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/templates/awesome/awesome_template.rb
Expand Up @@ -56,7 +56,8 @@ def write_file_data
out << "&nbsp;"
end
out << "</td>"
out << "<td valign='top'><a name='line#{idx + 1}'>#{convertor.convert(line)}</a></td>"
line_for_display = MetricFu.configuration.syntax_highlighting ? convertor.convert(line) : line
out << "<td valign='top'><a name='line#{idx + 1}'>#{line_for_display}</a></td>"
out << "</tr>"
end
out << "<table></body></html>"
Expand Down

0 comments on commit a73ec00

Please sign in to comment.