]> source.dussan.org Git - redmine.git/commitdiff
Merged r8001 from trunk
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 30 Nov 2011 08:25:01 +0000 (08:25 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 30 Nov 2011 08:25:01 +0000 (08:25 +0000)
pdf: fix textilized outputs of coderay line numbers.

Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@8003 e93f8b46-1217-0410-a6f0-8f06a7374b81

vendor/plugins/rfpdf/lib/tcpdf.rb

index 110f7d5205a92340352b6e369bb2d498836df6a0..9f7fa1bb72df9ca5e4a741f8fe4b77a69ba7a1df 100755 (executable)
@@ -3532,11 +3532,11 @@ class TCPDF
                                        @page = base_page;
                                        @x = base_x + @tdwidth;
                                        @y = base_y;
+                               elsif (@pre_state == true and element.length > 0)
+                                       Write(@lasth, unhtmlentities(element), '', fill);
                                elsif (element.strip.length > 0)
-                                       if @pre_state != true
-                                               element.gsub!(/[\t\r\n\f]/, "");
-                                               element.gsub!(/&nbsp;/, " ");
-                                       end
+                                       element.gsub!(/[\t\r\n\f]/, "");
+                                       element.gsub!(/&nbsp;/, " ");
                                        Write(@lasth, unhtmlentities(element), '', fill);
                                end
       end