aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html_format.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-07-27 23:54:19 -0400
committerRalph Amissah <ralph@amissah.com>2010-07-27 23:54:19 -0400
commit248be7a781c1e9aa13e3637e2fd6afad634c484d (patch)
tree205296063d4c6828bdf9461c46c7898a57d75852 /lib/sisu/v2/html_format.rb
parentodf: lt (<), gt (>) fix for codeblocks; &amp fix, messy (diff)
html_format, epub_format: subtoc, footnote content bug (fix)
Diffstat (limited to 'lib/sisu/v2/html_format.rb')
-rw-r--r--lib/sisu/v2/html_format.rb6
1 files changed, 6 insertions, 0 deletions
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
</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