diff --git a/src/Html2Text.php b/src/Html2Text.php index 5153cef..c9b3b4a 100644 --- a/src/Html2Text.php +++ b/src/Html2Text.php @@ -285,6 +285,7 @@ static function iterateOverNode($node, $prevName = null, $in_pre = false, $is_of case "ol": case "ul": case "pre": + case "table": // add two newlines $output = "\n\n"; break; @@ -396,6 +397,7 @@ static function iterateOverNode($node, $prevName = null, $in_pre = false, $is_of case "h5": case "h6": case "pre": + case "table": case "p": // add two lines $output .= "\n\n"; diff --git a/tests/full_email.txt b/tests/full_email.txt index 1b464c5..8919aa8 100644 --- a/tests/full_email.txt +++ b/tests/full_email.txt @@ -19,6 +19,7 @@ You're currently finding about per day [Number of cats found] + --------------------------------------------------------------- Your last cat was found two days ago. diff --git a/tests/table.html b/tests/table.html index b4b3cf0..04baffe 100644 --- a/tests/table.html +++ b/tests/table.html @@ -48,6 +48,6 @@