]> git.lyx.org Git - features.git/commitdiff
HTML for special characters.
authorRichard Heck <rgheck@comcast.net>
Wed, 31 Mar 2010 20:49:21 +0000 (20:49 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 31 Mar 2010 20:49:21 +0000 (20:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33987 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathSpecialChar.cpp
src/mathed/InsetMathSpecialChar.h

index 2c600d0c2b38791bf7c0852c368fb06630a5a38a..a1f9dd40e9046c683d50b95f9985f809644c0fab 100644 (file)
@@ -160,4 +160,17 @@ void InsetMathSpecialChar::mathmlize(MathStream & ms) const
 }
 
 
+void InsetMathSpecialChar::htmlize(HtmlStream & ms) const
+{
+       switch (char_) {
+       case '&':
+               ms << "&amp;";
+               break;
+       default:
+               ms.os().put(char_);
+               break;
+       }
+}
+
+
 } // namespace lyx
index c672b504f688045bce4ba1acabf181f25f7ad756..f24acfb6f9e503622206fb36b0e032dba404dd06 100644 (file)
@@ -46,6 +46,8 @@ public:
        void mathematica(MathematicaStream &) const;
        ///
        void mathmlize(MathStream & ms) const;
+       ///
+       void htmlize(HtmlStream & ms) const;
        /// identifies SpecialChar insets
        InsetMathSpecialChar const * asSpecialCharInset() const { return this; }
        ///