1
/***************************************************************************
2
* plainhtml.cpp - description
4
* begin : Thu Jun 24 1999
5
* copyright : (C) 1999 by Torsten Uhlmann
6
* email : TUhlmann@gmx.de
8
* Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
9
* CrossWire Bible Society
11
* Tempe, AZ 85280-2528
13
* This program is free software; you can redistribute it and/or modify it
14
* under the terms of the GNU General Public License as published by the
15
* Free Software Foundation version 2.
17
* This program is distributed in the hope that it will be useful, but
18
* WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* General Public License for more details.
24
#include <plainhtml.h>
29
PLAINHTML::PLAINHTML()
34
char PLAINHTML::processText(SWBuf &text, const SWKey *key, const SWModule *module)
39
const char *from = orig.c_str();
40
for (text = ""; *from; from++)
42
if ((*from == '\n') && (from[1] == '\n')) // two newlinea are a paragraph
48
if ((*from == '\n')) // && (from[1] != '\n')) // only one new line
55
if (*from == '{') { //footnote start
56
text += "<FONT COLOR=\"#80000\"><SMALL> (";
59
else if (*from == '}') //footnote end
61
text += ") </SMALL></FONT>";
64
else if (*from == '<') {
68
else if (*from == '>') {
72
else if (*from == '&') {
76
else if ((*from == ' ') && (count > 5000))