Skip to content

Commit

Permalink
markdown-Pages: PHP-Highlighting aktivieren (#4910)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Nov 12, 2021
1 parent 2fa8fee commit 5599c58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion redaxo/src/core/lib/be/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,10 @@ public static function includeCurrentPageSubPath(array $context = [])
$path = $languagePath;
}

[$toc, $content] = rex_markdown::factory()->parseWithToc(rex_file::require($path), 2, 3, false);
[$toc, $content] = rex_markdown::factory()->parseWithToc(rex_file::require($path), 2, 3, [
rex_markdown::SOFT_LINE_BREAKS => false,
rex_markdown::HIGHLIGHT_PHP => true,
]);
$fragment = new rex_fragment();
$fragment->setVar('content', $content, false);
$fragment->setVar('toc', $toc, false);
Expand Down

0 comments on commit 5599c58

Please sign in to comment.