#include "support/lstrings.h"
#include "support/std_ostream.h"
#include "support/convert.h"
+#include "support/textutils.h"
#include <map>
#include <sstream>
return (*known).second;
// make sure it starts with a letter
- if (!isalpha(*it) && allowed.find(*it) >= allowed.size())
+ if (!isAlphaASCII(*it) && allowed.find(*it) >= allowed.size())
content += "x";
bool mangle = false;
for (; it != end; ++it) {
char c = *it;
- if (isalpha(c) || isdigit(c) || c == '-' || c == '.' || allowed.find(c) < allowed.size())
+ if (isAlphaASCII(c) || isDigitASCII(c) || c == '-' || c == '.'
+ || allowed.find(c) < allowed.size())
content += c;
else if (c == '_' || c == ' ') {
mangle = true;
if (mangle) {
content += "-" + convert<docstring>(mangleID++);
}
- else if (isdigit(content[content.size() - 1])) {
+ else if (isDigitASCII(content[content.size() - 1])) {
content += ".";
}
param = subst(param, ">", "\"");
if (!name.empty() && name != "!-- --") {
- os << '<' << from_ascii(name);
+ os << '<' << from_ascii(name);
if (!param.empty())
- os << ' ' << from_ascii(param);
+ os << ' ' << from_ascii(param);
os << '>';
}
}
void sgml::closeTag(odocstream & os, string const & name)
{
- // FIXME UNICODE
if (!name.empty() && name != "!-- --")
- os << "</" << from_ascii(name) << '>';
+ os << "</" << from_ascii(name) << '>';
}
-void sgml::openTag(Buffer const & buf, odocstream & os, OutputParams const & runparams, Paragraph const & par)
+void sgml::openTag(Buffer const & buf, odocstream & os,
+ OutputParams const & runparams, Paragraph const & par)
{
LyXLayout_ptr const & style = par.layout();
string const & name = style->latexname();