mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-23 22:30:41 +01:00
added parsedown function to recipe.php
This commit is contained in:
parent
6ee9372ca4
commit
e2deee8fc8
1 changed files with 8 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
|||
<script src="/bin/recipe.js" charset="utf-8"></script>
|
||||
<?php
|
||||
include $_SESSION["docroot"].'/php/classes.recipe.php';
|
||||
include $_SESSION["docroot"].'/php/classes.parsedown.php';
|
||||
$book = new cookbook;
|
||||
$book->getRecipe($_GET["number"]);
|
||||
$recipe = $book->sites[0];
|
||||
|
@ -17,9 +18,13 @@
|
|||
}
|
||||
echo "</div>";
|
||||
echo "<h2>Zubereitung</h2>";
|
||||
foreach(explode("\r\n", $recipe->Beschreibung) as $paragraph){
|
||||
echo "<p>$paragraph</p>";
|
||||
}
|
||||
$parsedown = new Parsedown;
|
||||
// var_dump($recipe->Beschreibung);
|
||||
echo $parsedown->text($recipe->Beschreibung);
|
||||
// foreach(explode("\r\n", $recipe->Beschreibung) as $paragraph){
|
||||
// echo "<p>$paragraph</p>";
|
||||
// }
|
||||
|
||||
?>
|
||||
<div id="editingMenu"></div>
|
||||
<div id="editingMenuOpen">
|
||||
|
|
Loading…
Reference in a new issue