From 0774236eb84d9f9986e56e9830921c78de56525c Mon Sep 17 00:00:00 2001
From: Ulf Wiger <ulf@feuerlabs.com>
Date: Wed, 17 Jun 2015 00:18:25 +0200
Subject: [PATCH] handle deep lists in drop_empty_lines()

---
 src/edown_layout.erl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/edown_layout.erl b/src/edown_layout.erl
index 1a850bd..a6ec03e 100644
--- a/src/edown_layout.erl
+++ b/src/edown_layout.erl
@@ -1328,7 +1328,11 @@ drop_empty_lines([#xmlText{value = Txt}=H|T]) ->
 	    drop_empty_lines(T);
 	Rest ->
 	    [H#xmlText{value = Rest}|T]
-    end.
+    end;
+drop_empty_lines([H|T]) when is_list(H) ->
+    drop_empty_lines(H ++ T);
+drop_empty_lines(L) ->
+    L.
 
 trim_leading_lines([H|T]) when H==$\n; H==$\t; H==$\s ->
     trim_leading_lines(T);
-- 
GitLab