From 6e41d3006d52f71bf5564c07bd553304ad57a742 Mon Sep 17 00:00:00 2001
From: Enrico Forestieri <forenr@lyx.org>
Date: Thu, 18 Nov 2010 14:20:19 +0000
Subject: [PATCH] Output end of math environments at the beginning of a new
 line, as now this should be blank line safe.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36372 a592a061-630c-0410-9148-cb99ea01b6c8
---
 src/mathed/InsetMathHull.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 0ada0bc9f5..6bbd83a931 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -737,7 +737,7 @@ void InsetMathHull::header_write(WriteStream & os) const
 		break;
 
 	default:
-		os << "\\begin{unknown" << star(n) << '}';
+		os << "\\begin{unknown" << star(n) << "}\n";
 		break;
 	}
 }
@@ -758,9 +758,9 @@ void InsetMathHull::footer_write(WriteStream & os) const
 
 	case hullEquation:
 		if (n)
-			os << "\\end{equation" << star(n) << "}\n";
+			os << "\n\\end{equation" << star(n) << "}\n";
 		else
-			os << "\\]\n";
+			os << "\n\\]\n";
 		break;
 
 	case hullEqnArray:
@@ -770,11 +770,11 @@ void InsetMathHull::footer_write(WriteStream & os) const
 	case hullXAlignAt:
 	case hullGather:
 	case hullMultline:
-		os << "\\end{" << hullName(type_) << star(n) << "}\n";
+		os << "\n\\end{" << hullName(type_) << star(n) << "}\n";
 		break;
 
 	case hullXXAlignAt:
-		os << "\\end{" << hullName(type_) << "}\n";
+		os << "\n\\end{" << hullName(type_) << "}\n";
 		break;
 
 	case hullRegexp:
@@ -782,7 +782,7 @@ void InsetMathHull::footer_write(WriteStream & os) const
 		break;
 
 	default:
-		os << "\\end{unknown" << star(n) << '}';
+		os << "\n\\end{unknown" << star(n) << "}\n";
 		break;
 	}
 }