mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit 909ec39be8e9a32b6927af48807fb2045b47df24
parent 5a93fd78638d16d2803982a3733ca4ce6834ea07
Author: markseu <mark2011@mayberg.se>
Date:   Wed, 10 Jun 2015 14:53:33 +0200

Core update (Markdown without domain links)

Diffstat:
MREADME.md | 2+-
Msystem/core/core.php | 2+-
Msystem/plugins/markdown.php | 8++++----
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md @@ -1,4 +1,4 @@ -Yellow 0.5.21 +Yellow 0.5.22 ============= [![Yellow](https://raw.githubusercontent.com/wiki/datenstrom/yellow/images/yellow.jpg)](http://datenstrom.se/yellow) diff --git a/system/core/core.php b/system/core/core.php @@ -5,7 +5,7 @@ // Yellow main class class Yellow { - const Version = "0.5.21"; + const Version = "0.5.22"; var $page; //current page var $pages; //pages from file system var $files; //files from file system diff --git a/system/plugins/markdown.php b/system/plugins/markdown.php @@ -5,7 +5,7 @@ // Markdown plugin class YellowMarkdown { - const Version = "0.5.6"; + const Version = "0.5.7"; var $yellow; //access to API // Handle initialisation @@ -48,10 +48,10 @@ class YellowMarkdownParser extends MarkdownExtraParser // Transform text function transform($text) { - $text = preg_replace("/@domain/i", $this->page->serverScheme."://".$this->page->serverName, $text); $text = preg_replace("/@pageRead/i", $this->page->get("pageRead"), $text); $text = preg_replace("/@pageEdit/i", $this->page->get("pageEdit"), $text); $text = preg_replace("/@pageError/i", $this->page->get("pageError"), $text); + $text = preg_replace("/@pageFile/i", $this->page->get("pageFile"), $text); return parent::transform($text); } @@ -73,7 +73,7 @@ class YellowMarkdownParser extends MarkdownExtraParser { $text = preg_replace_callback("/<(\w+:[^\'\">\s]+)>/", array(&$this, "_doAutoLinks_url_callback"), $text); $text = preg_replace_callback("/<([\w\-\.]+@[\w\-\.]+)>/", array(&$this, "_doAutoLinks_email_callback"), $text); - $text = preg_replace_callback("/\[(\w+)\s+(.*?)\]/", array(&$this, "_doAutoLinks_shortcut_callback"), $text); + $text = preg_replace_callback("/\[(\w+)(.*?)\]/", array(&$this, "_doAutoLinks_shortcut_callback"), $text); $text = preg_replace_callback("/\[\-\-(.*?)\-\-\]/", array(&$this, "_doAutoLinks_comment_callback"), $text); $text = preg_replace_callback("/((http|https|ftp):\/\/\S+[^\'\"\,\.\;\:\s]+)/", array(&$this, "_doAutoLinks_url_callback"), $text); $text = preg_replace_callback("/([\w\-\.]+@[\w\-\.]+\.[\w]{2,4})/", array(&$this, "_doAutoLinks_email_callback"), $text); @@ -83,7 +83,7 @@ class YellowMarkdownParser extends MarkdownExtraParser // Handle shortcuts function _doAutoLinks_shortcut_callback($matches) { - $output = $this->page->parseContentBlock($matches[1], $matches[2], true); + $output = $this->page->parseContentBlock($matches[1], trim($matches[2]), true); if(is_null($output)) $output = htmlspecialchars($matches[0], ENT_NOQUOTES); return substr($output, 0, 4)=="<div" ? $this->hashBlock(trim($output)) : $this->hashPart(trim($output)); }