[sword-svn] r3647 - in trunk: src/modules/filters tests/testsuite

scribe at crosswire.org scribe at crosswire.org
Sun Jun 9 21:58:36 MST 2019


Author: scribe
Date: 2019-06-09 21:58:36 -0700 (Sun, 09 Jun 2019)
New Revision: 3647

Modified:
   trunk/src/modules/filters/osisxhtml.cpp
   trunk/tests/testsuite/osis_basic.good
   trunk/tests/testsuite/osis_mod2zmod.good
   trunk/tests/testsuite/osis_osis2modcipher.good
Log:
updated OSISXHTML filter to handle OSIS <seg type="otPassage">

Modified: trunk/src/modules/filters/osisxhtml.cpp
===================================================================
--- trunk/src/modules/filters/osisxhtml.cpp	2019-06-10 03:46:13 UTC (rev 3646)
+++ trunk/src/modules/filters/osisxhtml.cpp	2019-06-10 04:58:36 UTC (rev 3647)
@@ -50,6 +50,7 @@
 		.indent4 { margin-left: 4em; }\n\
 		abbr { &:hover{ &:before{ content: attr(title); } } }\n\
 		.small-caps { font-variant: small-caps; }\n\
+		.otPassage { font-variant: small-caps; }\n\
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }\n\
 		.acrostic { text-align: center; }\n\
 		.colophon {font-style: italic; font-size: small; display: block; }\n\
@@ -626,6 +627,18 @@
 				outText("</span>", buf, u);
 			}
 		}
+		// <seg>
+		else if (!strcmp(tag.getName(), "seg")) {
+			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+				SWBuf type = tag.getAttribute("type");
+				outText("<span class=\"", buf, u);
+				outText(type, buf, u);
+				outText("\">", buf, u);
+			}
+			else if (tag.isEndTag()) {
+				outText("</span>", buf, u);
+			}
+		}
 
 		// divineName  
 		else if (!strcmp(tag.getName(), "divineName")) {

Modified: trunk/tests/testsuite/osis_basic.good
===================================================================
--- trunk/tests/testsuite/osis_basic.good	2019-06-10 03:46:13 UTC (rev 3646)
+++ trunk/tests/testsuite/osis_basic.good	2019-06-10 04:58:36 UTC (rev 3647)
@@ -28,6 +28,7 @@
 		.indent4 { margin-left: 4em; }
 		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
+		.otPassage { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
 		.colophon {font-style: italic; font-size: small; display: block; }
@@ -38,7 +39,7 @@
 	
 -------
 RenderText:
- <span class="line indent0"><span class="divineName">Lord</span>, how are they increased that trouble me!</span><br />
+ <span class="line indent0"><span class=""><span class="divineName">Lord</span></span>, how are they increased that trouble me!</span><br />
 <span class="line indent0">many <span class="transChange transChange-added">are</span> they that rise up against me.</span><br />
 
 -------
@@ -70,6 +71,7 @@
 		.indent4 { margin-left: 4em; }
 		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
+		.otPassage { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
 		.colophon {font-style: italic; font-size: small; display: block; }
@@ -119,6 +121,7 @@
 		.indent4 { margin-left: 4em; }
 		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
+		.otPassage { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
 		.colophon {font-style: italic; font-size: small; display: block; }

Modified: trunk/tests/testsuite/osis_mod2zmod.good
===================================================================
--- trunk/tests/testsuite/osis_mod2zmod.good	2019-06-10 03:46:13 UTC (rev 3646)
+++ trunk/tests/testsuite/osis_mod2zmod.good	2019-06-10 04:58:36 UTC (rev 3647)
@@ -28,6 +28,7 @@
 		.indent4 { margin-left: 4em; }
 		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
+		.otPassage { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
 		.colophon {font-style: italic; font-size: small; display: block; }
@@ -38,7 +39,7 @@
 	
 -------
 RenderText:
- <span class="line indent0"><span class="divineName">Lord</span>, how are they increased that trouble me!</span><br />
+ <span class="line indent0"><span class=""><span class="divineName">Lord</span></span>, how are they increased that trouble me!</span><br />
 <span class="line indent0">many <span class="transChange transChange-added">are</span> they that rise up against me.</span><br />
 
 -------
@@ -70,6 +71,7 @@
 		.indent4 { margin-left: 4em; }
 		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
+		.otPassage { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
 		.colophon {font-style: italic; font-size: small; display: block; }
@@ -119,6 +121,7 @@
 		.indent4 { margin-left: 4em; }
 		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
+		.otPassage { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
 		.colophon {font-style: italic; font-size: small; display: block; }

Modified: trunk/tests/testsuite/osis_osis2modcipher.good
===================================================================
--- trunk/tests/testsuite/osis_osis2modcipher.good	2019-06-10 03:46:13 UTC (rev 3646)
+++ trunk/tests/testsuite/osis_osis2modcipher.good	2019-06-10 04:58:36 UTC (rev 3647)
@@ -28,6 +28,7 @@
 		.indent4 { margin-left: 4em; }
 		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
+		.otPassage { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
 		.colophon {font-style: italic; font-size: small; display: block; }
@@ -38,7 +39,7 @@
 	
 -------
 RenderText:
- <span class="line indent0"><span class="divineName">Lord</span>, how are they increased that trouble me!</span><br />
+ <span class="line indent0"><span class=""><span class="divineName">Lord</span></span>, how are they increased that trouble me!</span><br />
 <span class="line indent0">many <span class="transChange transChange-added">are</span> they that rise up against me.</span><br />
 
 -------
@@ -70,6 +71,7 @@
 		.indent4 { margin-left: 4em; }
 		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
+		.otPassage { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
 		.colophon {font-style: italic; font-size: small; display: block; }
@@ -119,6 +121,7 @@
 		.indent4 { margin-left: 4em; }
 		abbr { &:hover{ &:before{ content: attr(title); } } }
 		.small-caps { font-variant: small-caps; }
+		.otPassage { font-variant: small-caps; }
 		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
 		.acrostic { text-align: center; }
 		.colophon {font-style: italic; font-size: small; display: block; }




More information about the sword-cvs mailing list