aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/epub_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/epub_format.rb')
-rw-r--r--lib/sisu/v2/epub_format.rb6
1 files changed, 6 insertions, 0 deletions
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
</p>
}
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>|<a\s+name="\S+?">/mi
@txt.gsub(/<\/?i>|<a\s+name="\S+?">/mi,'') #removes name markers from subtoc, go directly to substantive text