From 27ac3193e33a0e7208d8956fb5c9af75deb8276a Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 30 Nov 2011 08:25:01 +0000 Subject: [PATCH] Merged r8001 from trunk 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/plugins/rfpdf/lib/tcpdf.rb b/vendor/plugins/rfpdf/lib/tcpdf.rb index 110f7d520..9f7fa1bb7 100755 --- a/vendor/plugins/rfpdf/lib/tcpdf.rb +++ b/vendor/plugins/rfpdf/lib/tcpdf.rb @@ -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!(/ /, " "); - end + element.gsub!(/[\t\r\n\f]/, ""); + element.gsub!(/ /, " "); Write(@lasth, unhtmlentities(element), '', fill); end end -- 2.39.5