aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/xml.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-09 12:28:18 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-09 12:28:18 +0100
commita6a8bb8f2960aeb218a0687d456d662a21ea6616 (patch)
tree8d465223114bda9233cc1938d37b87ecb6bca731 /lib/sisu/v0/xml.rb
parentUpdated sisu-0.60.1 (diff)
parentchangelog update (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v0/xml.rb')
-rw-r--r--lib/sisu/v0/xml.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sisu/v0/xml.rb b/lib/sisu/v0/xml.rb
index b230ec9f..d6db3ca7 100644
--- a/lib/sisu/v0/xml.rb
+++ b/lib/sisu/v0/xml.rb
@@ -233,13 +233,15 @@ WOK
@@xml[:body] << if lv; %{#{@tab*1}<text class="h#{lv}">\n#{@tab*2}#{wrapped}\n#{@tab*1}</text>\n} << "\n"
else %{#{@tab*1}<text class="#{type}">\n#{@tab*2}#{wrapped}\n#{@tab*1}</text>\n} # main text, contents, body KEEP
end
- @@xml[:body] << @endnotes if @endnotes # main text, endnotes KEEP
+ @@xml[:body] << @endnotes if @endnotes
##@@xml[:body] << "#{@tab*1}<text>#{para[@regx,2]}</text>\n" if para[@regx,2] # old unwrapped main text, contents, body KEEP
@@xml[:body] << "#{@tab*0}</object>" << "\n" if para[@regx]
@endnotes=[]
end
def group_structure(para='',ocn='')
para.gsub!(/<:group(?:-end)?>/,'')
+ extract_endnotes(para)
+ para.gsub!(/~[{\[]([\d*+]+)\s+(?:.+?)\s*<#@dp>[}\]]~/,'<en>\1</en>') #footnote/endnote clean
para=@trans.markup_group(para)
para.strip!
@@xml[:body] << %{#{@tab*0}<object id="#{ocn}">} << "\n"
@@ -248,6 +250,8 @@ WOK
@@xml[:body] << %{#{@tab*2}#{para}#{@tab*1}\n}
@@xml[:body] << %{#{@tab*1}</text>\n}
@@xml[:body] << "#{@tab*0}</object>" << "\n"
+ @@xml[:body] << @endnotes if @endnotes
+ @endnotes=[]
end
def poem_structure(para='',ocn='')
para.gsub!(/<:verse(?:-end)?>/,'')