summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorTroy A. Griffitts <scribe@crosswire.org>2010-06-07 22:41:04 +0000
committerTroy A. Griffitts <scribe@crosswire.org>2010-06-07 22:41:04 +0000
commit53046e22147f5b8186e509fc3c4c8214ef3f1d51 (patch)
treeb34d01a30ef49c56a3aca9ee41ab7db9e4df1f89 /modules
parentd73798de5c88c5eae86bfffeb60e3a017dbf716c (diff)
downloadsword-tools-53046e22147f5b8186e509fc3c4c8214ef3f1d51.tar.gz
fixed ' getting transformed before divineName LORD'S
fixed extra comma added after divine name git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@281 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules')
-rw-r--r--modules/nasb/cutil/nasbosis.cpp31
1 files changed, 20 insertions, 11 deletions
diff --git a/modules/nasb/cutil/nasbosis.cpp b/modules/nasb/cutil/nasbosis.cpp
index 58309ab..9d3d188 100644
--- a/modules/nasb/cutil/nasbosis.cpp
+++ b/modules/nasb/cutil/nasbosis.cpp
@@ -256,9 +256,9 @@ int main(int argc, char **argv) {
//<SF>
if (!strncmp(outstring.c_str(), "<SF>", 4)) {
- outstring = "";
string heading = outstring.c_str()+4;
heading = heading.substr(0, heading.find("</SF>"));
+ outstring = "";
if (!strncmp(lookahead.c_str(), "<PM>", 4)) {
lookahead.erase(0, 4);
@@ -273,9 +273,9 @@ int main(int argc, char **argv) {
//<SH>
if (!strncmp(outstring.c_str(), "<SH>", 4)) {
- outstring = "";
string heading = outstring.c_str()+4;
heading = heading.substr(0, heading.find("</SH>"));
+ outstring = "";
if (!strncmp(lookahead.c_str(), "<PM>", 4)) {
lookahead.erase(0, 4);
@@ -747,14 +747,9 @@ void unicodeTicks(string &outstring) {
int end = 0;
while (1) {
- // silly, have to do this here or can't find the ' in strstr
- const char *outstr = outstring.c_str();
- const char *found = strstr(outstr, "L\\{ORD'S}/");
- int start = (found) ? (found - outstr) : -1;
- if (start > -1) {
- outstring.replace(start, 10, "<seg><divineName>Lord's</divineName></seg>");
- continue;
- }
+ const char *outstr;
+ const char *found;
+ int start;
outstr = outstring.c_str();
found = strstr(outstr, "``");
@@ -878,10 +873,24 @@ void prepLine(string &outstring, int currentTestament, bool note) {
continue;
}
outstr = outstring.c_str();
+ found = strstr(outstr, "L\\{ORD}/’\\{S}/");
+ start = (found) ? (found - outstr) : -1;
+ if (start > -1) {
+ outstring.replace(start, 16, "<seg><divineName>Lord’s</divineName></seg>");
+ continue;
+ }
+ outstr = outstring.c_str();
+ found = strstr(outstr, "L\\{ORD,}/");
+ start = (found) ? (found - outstr) : -1;
+ if (start > -1) {
+ outstring.replace(start, 9, "<seg><divineName>Lord</divineName></seg>,");
+ continue;
+ }
+ outstr = outstring.c_str();
found = strstr(outstr, "L\\{ORD}/");
start = (found) ? (found - outstr) : -1;
if (start > -1) {
- outstring.replace(start, 8, "<seg><divineName>Lord</divineName></seg>,");
+ outstring.replace(start, 8, "<seg><divineName>Lord</divineName></seg>");
continue;
}
outstr = outstring.c_str();