Fix the output of a single dash in xhtml.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30004 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-06-06 16:32:51 +00:00
parent f5b0b57e50
commit 30a12853b8

View File

@ -2402,19 +2402,21 @@ void Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,
if (style.pass_thru)
os.put(c);
else if (c == '-') {
docstring str;
int j = i + 1;
if (j < size() && d->text_[j] == '-') {
j += 1;
if (j < size() && d->text_[j] == '-') {
os << from_ascii("&mdash;");
str += from_ascii("&mdash;");
i += 2;
} else {
os << from_ascii("&ndash;");
str += from_ascii("&ndash;");
i += 1;
}
}
else
os << c;
str += c;
os << str;
} else
os << html::escapeChar(c);
}