diff --git a/src/edown_layout.erl b/src/edown_layout.erl index 1a850bd1e75319af4dd588a09a02838bae6f2077..a6ec03e8323d81e1d2d3cea4d64b84b507ee6540 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);