[sword-svn] r153 - trunk/modules/perlconverters

chrislit at crosswire.org chrislit at crosswire.org
Sat Feb 14 01:23:05 MST 2009


Author: chrislit
Date: 2009-02-14 01:23:05 -0700 (Sat, 14 Feb 2009)
New Revision: 153

Modified:
   trunk/modules/perlconverters/usfm2osis.pl
Log:
added support for a few more tags

Modified: trunk/modules/perlconverters/usfm2osis.pl
===================================================================
--- trunk/modules/perlconverters/usfm2osis.pl	2009-02-14 07:58:23 UTC (rev 152)
+++ trunk/modules/perlconverters/usfm2osis.pl	2009-02-14 08:23:05 UTC (rev 153)
@@ -412,8 +412,8 @@
 	}
 
 
-	### Chapters and Verses--Markers Supported: \c, \v
-	#### Markers Not Yet Supported: \ca...\ca*, \cl, \cp, \cd, \va...\va*, \vp...\vp*
+	### Chapters and Verses--Markers Supported: \c, \v, \vp...\vp*
+	#### Markers Not Yet Supported: \ca...\ca*, \cl, \cp, \cd, \va...\va*
 
 	# \c chapter
 	if ($line =~ /^\\c\b\s*([^ ]*)/) {
@@ -474,6 +474,10 @@
 	    $line =~ s/\\v\b\s*(\d[^\\ ]*)? *//;
 	}
 
+        # \vp...\vp# published verse numbers (just delete for now)
+	$line =~ s/\\vp\*\s*//g;
+	$line =~ s/\\vp\b\s*(\d+[a-z]?|[a-z])\s*//g;
+
 	### Paragraphs--Markers Supported: \p, \b, \m, \nb
 	#### Markers Not Yet Supported: \m, \pmo, \pm, \pmc, \pmr, \pi#, \mi, \cls, \li#, \pc, \pr, \ph#, \b
 
@@ -496,6 +500,14 @@
 	    $line =~ s/\\pc\b\s*//;
 	}
 
+	# \mi2 paragraph flush left, no indentation
+	if ($line =~ /^\\mi2\b\s*/) {
+	    push (@outdata, closeTag("<\/p>"));
+	    push (@outdata, "<p type=\"x-noindent\">\n");
+	    openTag("<\/p>");
+	    $line =~ s/\\mi2\b\s*//;
+	}
+
 	# \b
 	$line =~ s/\\b\b//; 
 	# \m




More information about the sword-cvs mailing list