From 248be7a781c1e9aa13e3637e2fd6afad634c484d Mon Sep 17 00:00:00 2001
From: Ralph Amissah
Date: Tue, 27 Jul 2010 23:54:19 -0400
Subject: html_format, epub_format: subtoc, footnote content bug (fix)
---
lib/sisu/v2/epub_format.rb | 6 ++++++
lib/sisu/v2/html_format.rb | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/lib/sisu/v2/epub_format.rb b/lib/sisu/v2/epub_format.rb
index a10493ca..350e6f2c 100644
--- a/lib/sisu/v2/epub_format.rb
+++ b/lib/sisu/v2/epub_format.rb
@@ -1903,7 +1903,13 @@ WOK
}
end
+ def clean(txt)
+ txt.gsub!(/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}/,'')
+ txt.gsub!(/#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/,'')
+ txt
+ end
def subtoc_lev(tag,attrib)
+ @txt=clean(@txt)
txt=if @txt \
and @txt =~/<\/?i>|/mi
@txt.gsub(/<\/?i>|/mi,'') #removes name markers from subtoc, go directly to substantive text
diff --git a/lib/sisu/v2/html_format.rb b/lib/sisu/v2/html_format.rb
index 1cd5104f..47472406 100644
--- a/lib/sisu/v2/html_format.rb
+++ b/lib/sisu/v2/html_format.rb
@@ -1274,7 +1274,13 @@ WOK
}
end
+ def clean(txt)
+ txt.gsub!(/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}/,'')
+ txt.gsub!(/#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/,'')
+ txt
+ end
def subtoc_lev(tag,attrib)
+ @txt=clean(@txt)
txt=if @txt \
and @txt =~/<\/?i>|/mi
@txt.gsub(/<\/?i>|/mi,'') #removes name markers from subtoc, go directly to substantive text
--
cgit v1.2.3