diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-07-27 23:54:19 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-07-27 23:54:19 -0400 |
commit | 248be7a781c1e9aa13e3637e2fd6afad634c484d (patch) | |
tree | 205296063d4c6828bdf9461c46c7898a57d75852 /lib | |
parent | odf: lt (<), gt (>) fix for codeblocks; & fix, messy (diff) |
html_format, epub_format: subtoc, footnote content bug (fix)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v2/epub_format.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v2/html_format.rb | 6 |
2 files changed, 12 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 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 |