]> git.lyx.org Git - features.git/commitdiff
Fix the output of a single dash in xhtml.
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 6 Jun 2009 16:32:51 +0000 (16:32 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 6 Jun 2009 16:32:51 +0000 (16:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30004 a592a061-630c-0410-9148-cb99ea01b6c8

src/Paragraph.cpp

index 92706f0c46009347c227d9ee58c55ac6b1e15dc8..13335530401d4690c9cc3ab9a24d3171af8005ae 100644 (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);
                }