Skip to content

Commit

Permalink
Merge pull request etoa#212 from etoa/t/markdown
Browse files Browse the repository at this point in the history
Markdown: use library instead of class in code
  • Loading branch information
glaubinix authored Apr 13, 2020
2 parents efa1028 + 66fa101 commit 711b0ea
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 1,434 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"symfony/stopwatch": "~4.2.12",
"symfony/http-kernel": "~4.2.12",
"symfony/http-foundation": "~4.2.12",
"twig/twig": "^2.12"
"twig/twig": "^2.12",
"league/commonmark": "^1.3"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.0",
Expand Down
79 changes: 77 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions htdocs/admin/content/overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@
// Changelog
//
elseif ($sub === "changelog") {
$Parsedown = new Parsedown();
$changelogFile = "../../Changelog.md";
$changelogPublicFile = "../../Changelog_public.md";
echo $twig->render('admin/overview/changelog.html.twig', [
'changelog' => is_file($changelogFile) ? $Parsedown->text(file_get_contents($changelogFile)) : null,
'changelogPublic' => is_file($changelogPublicFile) ? $Parsedown->text(file_get_contents($changelogPublicFile)) : null,
'changelog' => is_file($changelogFile) ? $app['etoa.util.markdown']->convertToHtml(file_get_contents($changelogFile)) : null,
'changelogPublic' => is_file($changelogPublicFile) ? $app['etoa.util.markdown']->convertToHtml(file_get_contents($changelogPublicFile)) : null,
]);
exit();
}
Expand Down
Loading

0 comments on commit 711b0ea

Please sign in to comment.