aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/filters/gbfosis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/filters/gbfosis.cpp')
-rw-r--r--src/modules/filters/gbfosis.cpp35
1 files changed, 31 insertions, 4 deletions
diff --git a/src/modules/filters/gbfosis.cpp b/src/modules/filters/gbfosis.cpp
index eb65952..4b9ed81 100644
--- a/src/modules/filters/gbfosis.cpp
+++ b/src/modules/filters/gbfosis.cpp
@@ -43,6 +43,7 @@ char GBFOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModu
char *ch;
char *textStart, *textEnd;
char *wordStart, *wordEnd;
+ char *fromStart;
bool newText = false;
bool newWord = false;
std::string tmp;
@@ -57,8 +58,11 @@ char GBFOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModu
else from = text;
textStart = from;
+ fromStart = from;
wordStart = text;
+ QuoteStack quoteStack;
+
// -------------------------------
for (to = text; *from; from++) {
@@ -239,10 +243,18 @@ char GBFOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModu
}
}
else {
- if (newWord && (*from != ' ')) {wordStart = to; newWord = false; memset(to, 0, 10); }
- if (!suspendTextPassThru) {
- *to++ = *from;
- lastspace = (*from == ' ');
+ switch (*from) {
+ case '\'':
+ case '\"':
+ case '`':
+ quoteStack.handleQuote(fromStart, from, to);
+ break;
+ default:
+ if (newWord && (*from != ' ')) {wordStart = to; newWord = false; memset(to, 0, 10); }
+ if (!suspendTextPassThru) {
+ *to++ = *from;
+ lastspace = (*from == ' ');
+ }
}
}
}
@@ -335,4 +347,19 @@ const char *GBFOSIS::convertToOSIS(const char *inRef, const SWKey *key) {
return outRef.c_str();
}
+
+QuoteStack::QuoteStack() {
+ while (!quotes.empty()) quotes.pop();
+}
+
+
+QuoteStack::~QuoteStack() {
+ while (!quotes.empty()) quotes.pop();
+}
+
+
+void QuoteStack::handleQuote(char *buf, char *quotePos, char *to) {
+}
+
+
SWORD_NAMESPACE_END