From 167bed3c97cf49efd2036b1ead25af95a116116e Mon Sep 17 00:00:00 2001 From: Michael Tibben Date: Fri, 17 Apr 2020 09:00:59 +1000 Subject: [PATCH] Make strikethough_del the default behaviour --- src/Html2Text.php | 4 +--- test/DelTest.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Html2Text.php b/src/Html2Text.php index b74fd57..c42b3cf 100644 --- a/src/Html2Text.php +++ b/src/Html2Text.php @@ -229,8 +229,6 @@ class Html2Text 'width' => 70, // Maximum width of the formatted text, in columns. // Set this value to 0 (or less) to ignore word wrapping // and not constrain text to a fixed-width column. - - 'strikethough_del' => false, // use a combining character so that appears struck-through. ); private function legacyConstruct($html = '', $fromFile = false, array $options = array()) @@ -656,7 +654,7 @@ protected function strtoupper($str) */ protected function tostrike($str) { - if (self::ENCODING != 'UTF-8' || $this->options['strikethough_del'] !== true) { + if (self::ENCODING != 'UTF-8') { return $str; } $rtn = ''; diff --git a/test/DelTest.php b/test/DelTest.php index 8d37cfd..3b2c26c 100644 --- a/test/DelTest.php +++ b/test/DelTest.php @@ -9,7 +9,7 @@ public function testDel() $html = 'My Résumé Curriculum Vitæ'; $expected = 'My R̶é̶s̶u̶m̶é̶ Curriculum Vitæ'; - $html2text = new Html2Text($html, array('strikethough_del' => true)); + $html2text = new Html2Text($html); $this->assertEquals($expected, $html2text->getText()); } }