mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Merge pull request #879 from zilverline/master
Legit. Merging. Thanks for the bugfix, @s0meone!
This commit is contained in:
		| @@ -485,7 +485,7 @@ module Linguist | ||||
|     # | ||||
|     # Returns html String | ||||
|     def colorize(text, options = {}) | ||||
|       lexer.highlight(text, options = {}) | ||||
|       lexer.highlight(text, options) | ||||
|     end | ||||
|  | ||||
|     # Public: Return name as String representation | ||||
|   | ||||
| @@ -386,6 +386,15 @@ class TestLanguage < Test::Unit::TestCase | ||||
| <div class="highlight"><pre><span class="k">def</span> <span class="nf">foo</span> | ||||
|   <span class="s1">'foo'</span> | ||||
| <span class="k">end</span> | ||||
| </pre></div> | ||||
|     HTML | ||||
|   end | ||||
|  | ||||
|   def test_colorize_with_options | ||||
|     assert_equal <<-HTML.chomp, Language['Ruby'].colorize("def foo\n  'foo'\nend\n", :options => { :cssclass => "highlight highlight-ruby" }) | ||||
| <div class="highlight highlight-ruby"><pre><span class="k">def</span> <span class="nf">foo</span> | ||||
|   <span class="s1">'foo'</span> | ||||
| <span class="k">end</span> | ||||
| </pre></div> | ||||
|     HTML | ||||
|   end | ||||
|   | ||||
		Reference in New Issue
	
	Block a user