mikuli.cz

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

commit 1f0eea749ccaf57154255d6d33b13f6d06284cd8
parent 2eec57fd0d2a96626801eef0951ab4e126225d07
Author: markseu <mark2011@mayberg.se>
Date:   Tue,  2 Apr 2024 21:56:26 +0200

Updated core

Diffstat:
Msystem/extensions/core.php | 23++++++++++++++++++++++-
Msystem/extensions/update-available.ini | 4++--
Msystem/extensions/update-current.ini | 4++--
3 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/system/extensions/core.php b/system/extensions/core.php @@ -2,7 +2,7 @@ // Core extension, https://github.com/annaesvensson/yellow-core class YellowCore { - const VERSION = "0.8.130"; + const VERSION = "0.8.131"; const RELEASE = "0.8.23"; public $content; // content files public $media; // media files @@ -1659,6 +1659,27 @@ class YellowLookup { return $attributes; } + // Return HTML attributes from generic Markdown attributes + public function getHtmlAttributes($text) { + $htmlAttributes = ""; + $htmlAttributesData = array(); + foreach (explode(" ", $text) as $token) { + if (substru($token, 0, 1)==".") { + if (!isset($htmlAttributesData["class"])) { + $htmlAttributesData["class"] = substru($token, 1); + } else { + $htmlAttributesData["class"] .= " ".substru($token, 1); + } + } + if (substru($token, 0, 1)=="#") $htmlAttributesData["id"] = substru($token, 1); + if (preg_match("/^([\w]+)=(.+)/", $token, $matches)) $htmlAttributesData[$matches[1]] = $matches[2]; + } + foreach ($htmlAttributesData as $key=>$value) { + $htmlAttributes .= " $key=\"".htmlspecialchars($value)."\""; + } + return $htmlAttributes; + } + // Return MIME header field, encode and fold if necessary public function getMimeHeader($text, $field, $allowEncode = true) { if ($allowEncode) { diff --git a/system/extensions/update-available.ini b/system/extensions/update-available.ini @@ -148,14 +148,14 @@ system/themes/copenhagen.css: copenhagen.css, create, update, careful system/themes/copenhagen.png: copenhagen.png, create Extension: Core -Version: 0.8.130 +Version: 0.8.131 Description: Core functionality of your website. Developer: Anna Svensson Tag: feature DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip DocumentationUrl: https://github.com/annaesvensson/yellow-core DocumentationLanguage: en, de, sv -Published: 2024-04-02 11:48:14 +Published: 2024-04-02 20:52:39 Status: available system/extensions/core.php: core.php, create, update system/layouts/default.html: default.html, create, update, careful diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini @@ -1,14 +1,14 @@ # Datenstrom Yellow update settings for installed extensions Extension: Core -Version: 0.8.130 +Version: 0.8.131 Description: Core functionality of your website. Developer: Anna Svensson Tag: feature DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip DocumentationUrl: https://github.com/annaesvensson/yellow-core DocumentationLanguage: en, de, sv -Published: 2024-04-02 11:48:14 +Published: 2024-04-02 20:52:39 Status: available system/extensions/core.php: core.php, create, update system/layouts/default.html: default.html, create, update, careful