mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Fix bug #8078: Assertions in xhtml output on Windows
This commit is contained in:
parent
225bcf92df
commit
3c0e3c16c8
@ -16,6 +16,7 @@
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/textutils.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -67,9 +68,9 @@ string Floating::defaultCSSClass() const
|
||||
string::const_iterator it = n.begin();
|
||||
string::const_iterator en = n.end();
|
||||
for (; it != en; ++it) {
|
||||
if (!isalpha(*it))
|
||||
if (!isAlphaASCII(*it))
|
||||
d += "_";
|
||||
else if (islower(*it))
|
||||
else if (isLower(*it))
|
||||
d += *it;
|
||||
else
|
||||
d += support::lowercase(*it);
|
||||
|
@ -939,7 +939,7 @@ string Layout::defaultCSSClass() const
|
||||
d = from_ascii("lyx_");
|
||||
else
|
||||
d += '_';
|
||||
} else if (islower(c))
|
||||
} else if (isLower(c))
|
||||
d += c;
|
||||
else
|
||||
// this is slow, so do it only if necessary
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/textutils.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -436,9 +437,9 @@ string InsetLayout::defaultCSSClass() const
|
||||
string::const_iterator it = n.begin();
|
||||
string::const_iterator en = n.end();
|
||||
for (; it != en; ++it) {
|
||||
if (!isalpha(*it))
|
||||
if (!isAlphaASCII(*it))
|
||||
d += "_";
|
||||
else if (islower(*it))
|
||||
else if (isLower(*it))
|
||||
d += *it;
|
||||
else
|
||||
d += support::lowercase(*it);
|
||||
|
@ -193,7 +193,7 @@ void InsetMathChar::mathmlize(MathStream & ms) const
|
||||
}
|
||||
|
||||
char const * type =
|
||||
(isalpha(char_) || Encodings::isMathAlpha(char_))
|
||||
(isAlphaASCII(char_) || Encodings::isMathAlpha(char_))
|
||||
? "mi" : "mo";
|
||||
// we don't use MTag and ETag because we do not want the spacing
|
||||
ms << "<" << type << ">" << char_type(char_) << "</" << type << ">";
|
||||
@ -227,7 +227,7 @@ void InsetMathChar::htmlize(HtmlStream & ms) const
|
||||
return;
|
||||
}
|
||||
|
||||
if (isalpha(char_) || Encodings::isMathAlpha(char_))
|
||||
if (isAlphaASCII(char_) || Encodings::isMathAlpha(char_))
|
||||
// we don't use MTag and ETag because we do not want the spacing
|
||||
ms << MTag("i") << char_type(char_) << ETag("i");
|
||||
else
|
||||
|
@ -125,7 +125,7 @@ string cleanAttr(string const & str)
|
||||
string::const_iterator it = str.begin();
|
||||
string::const_iterator en = str.end();
|
||||
for (; it != en; ++it)
|
||||
newname += isalnum(*it) ? *it : '_';
|
||||
newname += isAlnumASCII(*it) ? *it : '_';
|
||||
return newname;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user