From b1a137135e0f820e43d33fc84e13e1202625b486 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 10 Jun 2013 10:58:33 -0500 Subject: [PATCH] Axe colorize_without_wrapper --- lib/linguist/blob_helper.rb | 14 -------------- test/test_blob.rb | 7 ------- 2 files changed, 21 deletions(-) diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index 933604b2..b538a11f 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -343,19 +343,5 @@ module Linguist options[:options][:encoding] ||= encoding lexer.highlight(data, options) end - - # Public: Highlight syntax of blob without the outer highlight div - # wrapper. - # - # options - A Hash of options (defaults to {}) - # - # Returns html String - def colorize_without_wrapper(options = {}) - if text = colorize(options) - text[%r{
(.*?)
\s*
}m, 1] - else - '' - end - end end end diff --git a/test/test_blob.rb b/test/test_blob.rb index 56d9e6f2..74a247d0 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -321,13 +321,6 @@ class TestBlob < Test::Unit::TestCase HTML end - def test_colorize_without_wrapper - assert_equal <<-HTML, blob("Ruby/foo.rb").colorize_without_wrapper -module Foo -end - HTML - end - def test_colorize_does_skip_minified_files assert_nil blob("JavaScript/jquery-1.6.1.min.js").colorize end