From e2deee8fc893658bba52969c40ef9097584a3074 Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Wed, 24 Oct 2018 18:24:05 +0200 Subject: [PATCH] added parsedown function to recipe.php --- cont/recipe.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cont/recipe.php b/cont/recipe.php index cacb39b..cb9565e 100644 --- a/cont/recipe.php +++ b/cont/recipe.php @@ -2,6 +2,7 @@ getRecipe($_GET["number"]); $recipe = $book->sites[0]; @@ -17,9 +18,13 @@ } echo ""; echo "

Zubereitung

"; - foreach(explode("\r\n", $recipe->Beschreibung) as $paragraph){ - echo "

$paragraph

"; - } + $parsedown = new Parsedown; + // var_dump($recipe->Beschreibung); + echo $parsedown->text($recipe->Beschreibung); + // foreach(explode("\r\n", $recipe->Beschreibung) as $paragraph){ + // echo "

$paragraph

"; + // } + ?>