Skip to content

Commit

Permalink
Updated core
Browse files Browse the repository at this point in the history
  • Loading branch information
markseuffert committed Apr 2, 2024
1 parent 2eec57f commit 1f0eea7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
23 changes: 22 additions & 1 deletion system/extensions/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1659,6 +1659,27 @@ public function getTextAttributes($text, $attributesAllowEmptyString) {
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) {
Expand Down
4 changes: 2 additions & 2 deletions system/extensions/update-available.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions system/extensions/update-current.ini
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1f0eea7

Please sign in to comment.