[sword-svn] r217 - trunk/modules/perlconverters
chrislit at crosswire.org
chrislit at crosswire.org
Mon Oct 19 21:43:38 MST 2009
Author: chrislit
Date: 2009-10-19 21:43:38 -0700 (Mon, 19 Oct 2009)
New Revision: 217
Modified:
trunk/modules/perlconverters/usfm2osis.pl
Log:
added \qr, \qac...\qac* handling
changed \qa handling to generate a <title>
Modified: trunk/modules/perlconverters/usfm2osis.pl
===================================================================
--- trunk/modules/perlconverters/usfm2osis.pl 2009-10-20 02:17:05 UTC (rev 216)
+++ trunk/modules/perlconverters/usfm2osis.pl 2009-10-20 04:43:38 UTC (rev 217)
@@ -528,16 +528,17 @@
# \nb
$line =~ s/\\nb\b//;
- ### Poetry--Markers Supported: \q#, \qs...\qs*, \qc, qa, \qm#
- #### Markers Not Yet Supported: \qac...\qac*, \qr \b
+ ### Poetry--Markers Supported: \q#, \qs...\qs*, \qr, \qc, \qac...\qac*, \qa, \qm#
+ #### Markers Not Yet Supported: \b
# \qt...\qt*, OT quotation (handle early)
$line =~ s/\\qt\b\s*(.*?)\\qt\*/<seg type="otPassage">$1<\/seg>/g;
- # \qa (Acrostic marker)
-
- $line =~ s/^\\qa\b\s*(.*$)/<hi type=\"acrostic\">$1<\/hi>/g;
+ # \qa, acrostic heading
+ $line =~ s/^\\qa\b\s*(.*)/<title type=\"acrostic\">$1<\/title>/g;
+ # \qac...\qac*, acrostic character style (used within a line)
+ $line =~ s/\\qac\b\s*(.*?)\\qac\*/<hi type="acrostic">$1<\/hi>/g;
# \q line
if ($line =~ /^\\q/) {
@@ -545,13 +546,16 @@
push (@outdata, "<lg>\n");
$l = 1;
}
- if ($line =~ /\\qm?(c|\d*)$/) {
+ if ($line =~ /\\qm?(c|r|\d*)$/) {
if ($1 eq "") {
$line = "<l>\n";
}
elsif ($1 eq "c") {
$line = "<l type=\"x-centered\">";
}
+ elsif ($1 eq "r") {
+ $line = "<l type=\"x-right\">";
+ }
else {
$line = "<l level=\"$1\">\n";
}
More information about the sword-cvs
mailing list