mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-24 06:40:01 +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>
|
<script src="/bin/recipe.js" charset="utf-8"></script>
|
||||||
<?php
|
<?php
|
||||||
include $_SESSION["docroot"].'/php/classes.recipe.php';
|
include $_SESSION["docroot"].'/php/classes.recipe.php';
|
||||||
|
include $_SESSION["docroot"].'/php/classes.parsedown.php';
|
||||||
$book = new cookbook;
|
$book = new cookbook;
|
||||||
$book->getRecipe($_GET["number"]);
|
$book->getRecipe($_GET["number"]);
|
||||||
$recipe = $book->sites[0];
|
$recipe = $book->sites[0];
|
||||||
|
@ -17,9 +18,13 @@
|
||||||
}
|
}
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo "<h2>Zubereitung</h2>";
|
echo "<h2>Zubereitung</h2>";
|
||||||
foreach(explode("\r\n", $recipe->Beschreibung) as $paragraph){
|
$parsedown = new Parsedown;
|
||||||
echo "<p>$paragraph</p>";
|
// 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="editingMenu"></div>
|
||||||
<div id="editingMenuOpen">
|
<div id="editingMenuOpen">
|
||||||
|
|
Loading…
Reference in a new issue