diff options
author | Chris Little <chrislit@crosswire.org> | 2010-11-05 22:51:21 +0000 |
---|---|---|
committer | Chris Little <chrislit@crosswire.org> | 2010-11-05 22:51:21 +0000 |
commit | 73e0795df1cc18cc284bdd328d1b810d063e1add (patch) | |
tree | 627bde01936b42efeac13cf6fffc13dc955f3b1c /modules | |
parent | b4ccdc0870226921b88e4b0a961020e06f8c218a (diff) | |
download | sword-tools-73e0795df1cc18cc284bdd328d1b810d063e1add.tar.gz |
move <verse eID=""/> upward, above lines that start with title, div, and p elements
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@312 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules')
-rw-r--r-- | modules/perlconverters/usfm2osis.pl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/perlconverters/usfm2osis.pl b/modules/perlconverters/usfm2osis.pl index e08bc42..70fb716 100644 --- a/modules/perlconverters/usfm2osis.pl +++ b/modules/perlconverters/usfm2osis.pl @@ -961,7 +961,7 @@ open (INF, "<:utf8", "$outputFilename"); close (INF); open (OUTF, ">:utf8", "$outputFilename"); -#bubble chapter down +# bubble chapter down for ($i = 0; $i < scalar(@filedata); $i++) { if (@filedata[$i] =~ /^<\// && @filedata[$i-1] =~ /^<chapter.+\/>/) { $temp = @filedata[$i]; @@ -970,6 +970,18 @@ for ($i = 0; $i < scalar(@filedata); $i++) { $i -= 2; } } + +# bubble verse end up +# CCL--this may require further attention, but works for the present +for ($i = 0; $i < scalar(@filedata); $i++) { + if (@filedata[$i-1] =~ /^(<title|<\/?div|<\/?p)/ && @filedata[$i] =~ /^<verse eID.+\/>/) { + $temp = @filedata[$i]; + @filedata[$i] = @filedata[$i-1]; + @filedata[$i-1] = $temp; + $i -= 2; + } +} + for ($i = 0; $i < scalar(@filedata); $i++) { $fullfile .= @filedata[$i]; } |