From f7a4fe6a46d5e8de756e257913cb7c8c59b8e64c Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Mon, 16 Oct 2017 15:10:28 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20wrapping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bot.php b/bot.php index 42a4723..6d51b2b 100644 --- a/bot.php +++ b/bot.php @@ -37,7 +37,11 @@ function ellipse($str,$n_chars,$crop_str='[...]') function formatdsc($description) { global $pandoc; $description = strip_tags($description, 'img'); - $description = $pandoc->convert($description, "html", "plain"); + $description = $pandoc->runWith($description, [ + 'from' => 'html', + 'to' => 'plain', + 'wrap' => 'none' + ]); $description = str_replace('Читать дальше', '', $description); $description = trim($description); return $description;