[sword-svn] r286 - trunk/modules/perlconverters
refdoc at crosswire.org
refdoc at crosswire.org
Sun Jul 11 22:21:09 MST 2010
Author: refdoc
Date: 2010-07-11 22:21:09 -0700 (Sun, 11 Jul 2010)
New Revision: 286
Modified:
trunk/modules/perlconverters/usfm2osis.pl
Log:
added imq and iq#
Modified: trunk/modules/perlconverters/usfm2osis.pl
===================================================================
--- trunk/modules/perlconverters/usfm2osis.pl 2010-07-11 12:38:27 UTC (rev 285)
+++ trunk/modules/perlconverters/usfm2osis.pl 2010-07-12 05:21:09 UTC (rev 286)
@@ -376,6 +376,44 @@
$line = "<p>$1<\/p>";
}
+ # \im introduction quotation (implemented as ordinary quotation)
+ if ($line =~ /^\\imq\b\s*(.*)/) {
+ $line = "<q>$1<\/q>";
+ }
+
+
+ # \iq line (including \iq#), adapted from \q (see below), needs more clean-up
+ if ($line =~ /^\\iq/) {
+ if ($l != 1) {
+ push (@outdata, "<lg>\n");
+ $l = 1;
+ }
+ if ($line =~ /\\iq(\d*)$/) {
+ if ($1 eq "") {
+ $line = "<l>\n";
+ }
+ else {
+ $line = "<l level=\"$1\">\n";
+ }
+ @filedata[$i+1] .= "<\/l>";
+ if (@filedata[$i+2] !~ /\\iq(?!t)/) {
+ @filedata[$i+1] .= "\n<\/lg>";
+ $l = 0;
+ }
+ }
+ else {
+ $line =~ s/\\iq\b\s*(.+)/<l>$1<\/l>/;
+ $line =~ s/\\iq(\d+)\b\s*(.+)/<l level=\"$1\">$2<\/l>/;
+ if (@filedata[$i+1] !~ /\\iq(?![ta])/) {
+ $line .= "\n<\/lg>";
+ $l = 0;
+ }
+ }
+ }
+
+
+
+
# \ie introduction end (discard)
if ($line =~ /^\\ie\b/) {
$line = "";
More information about the sword-cvs
mailing list