[sword-svn] r151 - trunk/modules/perlconverters
chrislit at crosswire.org
chrislit at crosswire.org
Sun Feb 8 18:54:38 MST 2009
Author: chrislit
Date: 2009-02-08 18:54:38 -0700 (Sun, 08 Feb 2009)
New Revision: 151
Modified:
trunk/modules/perlconverters/usfm2osis.pl
Log:
fixed final verse & chapter closers
Modified: trunk/modules/perlconverters/usfm2osis.pl
===================================================================
--- trunk/modules/perlconverters/usfm2osis.pl 2009-02-08 08:30:39 UTC (rev 150)
+++ trunk/modules/perlconverters/usfm2osis.pl 2009-02-09 01:54:38 UTC (rev 151)
@@ -736,6 +736,14 @@
}
}
+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++) {
$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";
More information about the sword-cvs
mailing list