Axe colorize_without_wrapper

This commit is contained in:
Joshua Peek
2013-06-10 10:58:33 -05:00
parent 1a53d1973a
commit b1a137135e
2 changed files with 0 additions and 21 deletions

View File

@@ -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{<div class="highlight"><pre>(.*?)</pre>\s*</div>}m, 1]
else
''
end
end
end
end

View File

@@ -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
<span class="k">module</span> <span class="nn">Foo</span>
<span class="k">end</span>
HTML
end
def test_colorize_does_skip_minified_files
assert_nil blob("JavaScript/jquery-1.6.1.min.js").colorize
end