diff --git a/system/includes/functions.php b/system/includes/functions.php index 1237111..a74df82 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -360,6 +360,11 @@ function get_posts($posts, $page = 1, $perpage = 0) // Get the contents and convert it to HTML $post->body = MarkdownExtra::defaultTransform(remove_html_comments($content)); + // Convert image tags to figures + if (config('fig.captions') == 'true') { + $post->body = preg_replace( '/
()<\/p>/', '