*/
#include <config.h>
-
+
#include "support/LOstream.h"
-
+
#include "paragraph.h"
#include "sgml.h"
-
+
using std::pair;
using std::make_pair;
using std::ostream;
using std::endl;
-
+
namespace sgml {
pair<bool, string> escapeChar(char c)
{
string str;
-
+
switch (c) {
- case Paragraph::META_HFILL:
- break;
- case Paragraph::META_NEWLINE:
- str = '\n';
- break;
case ' ':
return make_pair(true, string(" "));
break;
return make_pair(false, str);
}
-
+
int openTag(ostream & os, Paragraph::depth_type depth,
bool mixcont, string const & latexname)
{
if (!latexname.empty() && latexname != "!-- --") {
if (!mixcont)
- os << string(" ", depth);
- os << "<" << latexname << ">";
+ os << string(depth, ' ');
+ os << '<' << latexname << '>';
}
if (!mixcont)
{
if (!latexname.empty() && latexname != "!-- --") {
if (!mixcont)
- os << endl << string(" ", depth);
- os << "</" << latexname << ">";
+ os << endl << string(depth, ' ');
+ os << "</" << latexname << '>';
}
if (!mixcont)