summaryrefslogtreecommitdiffstats
path: root/modules/perlconverters
diff options
context:
space:
mode:
authorChris Little <chrislit@crosswire.org>2009-02-09 01:54:38 +0000
committerChris Little <chrislit@crosswire.org>2009-02-09 01:54:38 +0000
commitf414b053153e74f468c525d3a5da78058da75258 (patch)
tree1ac2d3d0015db28a52c24629a02f4b8879c89d39 /modules/perlconverters
parent3d1343883a78b3c36878323c3129babc26b3c6db (diff)
downloadsword-tools-f414b053153e74f468c525d3a5da78058da75258.tar.gz
fixed final verse & chapter closers
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@151 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/perlconverters')
-rw-r--r--modules/perlconverters/usfm2osis.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/perlconverters/usfm2osis.pl b/modules/perlconverters/usfm2osis.pl
index 5cdb375..2e651f2 100644
--- a/modules/perlconverters/usfm2osis.pl
+++ b/modules/perlconverters/usfm2osis.pl
@@ -736,6 +736,14 @@ foreach $file (@files) {
}
}
+if ($versClose =~ /<verse/) {
+ push (@outdata, $versClose); # close verse
+ $versClose = "";
+}
+if ($chapClose =~ /<chapter/) {
+ push (@outdata, $chapClose); # close chapter
+ $chapClose = "";
+}
push (@outdata, closeTag("<\/osis>"));
for ($i = 0; $i < scalar(@outdata); $i++) {
@@ -772,6 +780,7 @@ for ($i = 0; $i < scalar(@filedata); $i++) {
for ($i = 0; $i < scalar(@filedata); $i++) {
$fullfile .= @filedata[$i];
}
+$fullfile =~ s/<\/osisText>\n<\/osis>\n(<chapter eID[^>]+>)/$1\n<\/osisText>\n<\/osis>/mg; #swap the chapter back up one before the osisText closer
$fullfile =~ s/<\/div>\n(<chapter eID[^>]+>)/$1\n<\/div>/mg; #swap the chapter back up one before the book closer
print "Tagging quotations.\n";