mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix bug #8078: Assertions in xhtml output on Windows
(cherry picked from commit 3c0e3c16c8
)
This commit is contained in:
parent
124bc762a7
commit
0665673d03
@ -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);
|
||||
|
@ -1009,7 +1009,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>
|
||||
|
||||
@ -426,9 +427,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;
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,8 @@ What's new
|
||||
|
||||
* DOCUMENT INPUT/OUTPUT
|
||||
|
||||
- Fixed assertions on Windows for XHTML output (bug 8078).
|
||||
|
||||
- Fix reconfiguration on Windows when the user directory is a UNC path
|
||||
(bug 8098).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user