<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -15,10 +15,8 @@ module Simplabs
             f &lt;&lt; code
             f &lt;&lt; &quot;\n&quot;
           }
-          pygments = IO::popen(&quot;pygmentize -f html -l #{language} #{filename}&quot;)
-          result = pygments.read
-          pygments.close
-          clean_result(result)
+          result = `pygmentize -f html -O nowrap=true -l #{language} #{filename}`
+          result.chomp
         end
 
         protected
@@ -30,13 +28,6 @@ module Simplabs
             return false
           end
 
-          def clean_result(result)
-            result.strip!
-            result.sub!(/\A&lt;div class=\&quot;highlight\&quot;&gt;&lt;pre&gt;/, '')
-            result.sub!(/&lt;\/pre&gt;&lt;\/div&gt;\Z/, '')
-            result
-          end
-
       end
 
     end</diff>
      <filename>lib/simplabs/highlight/pygments_wrapper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,12 @@ require File.dirname(__FILE__) + '/../spec_helper'
 describe Simplabs::Highlight do
 
   before do
-    @ruby_code = 'class Test; end'
+    @ruby_code = &lt;&lt;-EOC
+class Test
+  def method test
+  end
+end
+EOC
   end
 
   describe '#highlight' do
@@ -35,7 +40,7 @@ describe Simplabs::Highlight do
       end
 
       it 'should correctly highlight source code passed as parameter' do
-        Simplabs::Highlight.highlight(:ruby, @ruby_code).should == &quot;&lt;span class=\&quot;k\&quot;&gt;class&lt;/span&gt; &lt;span class=\&quot;nc\&quot;&gt;Test&lt;/span&gt;&lt;span class=\&quot;p\&quot;&gt;;&lt;/span&gt; &lt;span class=\&quot;k\&quot;&gt;end&lt;/span&gt;\n&quot;
+        Simplabs::Highlight.highlight(:ruby, @ruby_code).should == &quot;&lt;span class=\&quot;k\&quot;&gt;class&lt;/span&gt; &lt;span class=\&quot;nc\&quot;&gt;Test&lt;/span&gt;\n  &lt;span class=\&quot;k\&quot;&gt;def&lt;/span&gt; &lt;span class=\&quot;nf\&quot;&gt;method&lt;/span&gt; &lt;span class=\&quot;nb\&quot;&gt;test&lt;/span&gt;\n  &lt;span class=\&quot;k\&quot;&gt;end&lt;/span&gt;\n&lt;span class=\&quot;k\&quot;&gt;end&lt;/span&gt;&quot;
       end
 
     end</diff>
      <filename>spec/lib/highlight_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,18 +18,6 @@ describe Simplabs::Highlight::PygmentsWrapper do
 
   end
 
-  describe '#clean_result' do
-
-    it 'should strip the specified text' do
-      Simplabs::Highlight::PygmentsWrapper.send(:clean_result, ' result   ').should == 'result'
-    end
-
-    it 'should remove the surrounding &lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt; as added by pygments' do
-      Simplabs::Highlight::PygmentsWrapper.send(:clean_result, '&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;formatted code&lt;/pre&gt;&lt;/div&gt;').should == 'formatted code'
-    end
-
-  end
-
   describe '#highlight' do
 
     before do
@@ -58,12 +46,6 @@ describe Simplabs::Highlight::PygmentsWrapper do
       file_contents.strip.should == @code
     end
 
-    it 'should clean the result' do
-      Simplabs::Highlight::PygmentsWrapper.should_receive(:clean_result).once.with(&quot;&lt;div class=\&quot;highlight\&quot;&gt;&lt;pre&gt;&lt;span class=\&quot;k\&quot;&gt;class&lt;/span&gt; &lt;span class=\&quot;nc\&quot;&gt;Test&lt;/span&gt;&lt;span class=\&quot;p\&quot;&gt;;&lt;/span&gt; &lt;span class=\&quot;k\&quot;&gt;end&lt;/span&gt;\n&lt;/pre&gt;&lt;/div&gt;\n&quot;)
-      
-      Simplabs::Highlight::PygmentsWrapper.highlight(@code, :ruby)
-    end
-    
   end
 
 end</diff>
      <filename>spec/lib/pygments_wrapper_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>56a40a2b731d0cbd47beab533f4726a4728aa2da</id>
    </parent>
  </parents>
  <author>
    <name>Marco Otte-Witte</name>
    <email>marco.otte-witte@simplabs.com</email>
  </author>
  <url>http://github.com/marcoow/highlight/commit/720066d59b464b407b5a1de3155fb59fb912ea5b</url>
  <id>720066d59b464b407b5a1de3155fb59fb912ea5b</id>
  <committed-date>2009-03-15T10:10:45-07:00</committed-date>
  <authored-date>2009-03-15T10:10:45-07:00</authored-date>
  <message>more tweaks for the highlighting</message>
  <tree>0ce9ca4f507826f1ab608aa1bb94cd5dbb2d0491</tree>
  <committer>
    <name>Marco Otte-Witte</name>
    <email>marco.otte-witte@simplabs.com</email>
  </committer>
</commit>
