diff --git a/src/parser.pegjs b/src/parser.pegjs
index ed93f9b92c0856c9e40bc2fd6628c228c5831830..b1795f374e616d44520cd6a0e8c5acb093ed7944 100644
--- a/src/parser.pegjs
+++ b/src/parser.pegjs
@@ -125,7 +125,7 @@ mathBlockLine
 // block: center
 
 center
-	= BEGIN "<center>" content:(!("</center>" END) i:inline { return i; })+ "</center>" END
+	= BEGIN "<center>" LF? content:(!(LF? "</center>" END) i:inline { return i; })+ LF? "</center>" END
 {
 	return createNode('center', null, mergeText(content));
 }