lib/review/htmlutils.rb in review-1.6.0 vs lib/review/htmlutils.rb in review-1.7.0

- old
+ new

@@ -38,11 +38,11 @@ def escape_comment(str) str.gsub('-', '-') end - def highlight_pygments? + def highlight? @book.config["pygments"].present? || @book.config["highlight"] && @book.config["highlight"]["html"] == "pygments" end def highlight(ops) @@ -56,11 +56,11 @@ format = ops[:format] || '' options = {:nowrap => true, :noclasses => true} if ops[:options] && ops[:options].kind_of?(Hash) options.merge!(ops[:options]) end - return body if !highlight_pygments? + return body if !highlight? begin require 'pygments' begin Pygments.highlight( @@ -85,6 +85,6 @@ return "id_#{CGI.escape(id.gsub("_", "__")).gsub("%", "_").gsub("+", "-")}" # escape all end end end -end # module ReVIEW +end # module ReVIEW