From 74ccedd6544daac0845a044b5e6d71d577578c69 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 7 Oct 2018 05:55:26 +0200 Subject: 2.9 map + filter fix + markdownextra --- class/class.w.art.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'class/class.w.art.php') diff --git a/class/class.w.art.php b/class/class.w.art.php index 12ff1e3..4c88987 100644 --- a/class/class.w.art.php +++ b/class/class.w.art.php @@ -1,6 +1,6 @@ html); + + $html = str_replace('%TITLE%', $this->titre(), $this->html); + $html = str_replace('%DESCRIPTION%', $this->intro(), $html); + + $parser = new MarkdownExtra; + $parser->header_id_func = function ($header) { + return preg_replace('/[^a-z0-9]/', '', strtolower($header)); + }; + $html = $parser->transform($html); $html = str_replace('href="=', 'href="?id=', $html); foreach ($this->lien('array') as $id) { @@ -241,9 +249,6 @@ class Art } - - $html = str_replace('%TITLE%', $this->titre(), $html); - $html = str_replace('%DESCRIPTION%', $this->intro(), $html); $html = str_replace('href="../media/', ' class="file" target="_blank" href="../media/', $html); $html = str_replace('href="http', ' class="external" target="_blank" href="http', $html); $html = str_replace('