diff --git a/composer.json b/composer.json index 713db37..964b96c 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "require": { "michelf/php-markdown": "1.4.*@dev", "suin/php-rss-writer": ">=1.0", - "kanti/hub-updater": "0.1" + "kanti/hub-updater": "~0.3" }, "autoload": { "files": [ diff --git a/composer.lock b/composer.lock index da2c326..e62ec1b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "42c6216df6dda4d98ab8a719067f67fa", + "hash": "fd413dc0819094cfb73068fa24dc1cf0", "packages": [ { "name": "kanti/hub-updater", - "version": "0.1", + "version": "v0.3.0", "source": { "type": "git", "url": "https://github.com/Kanti/hub-updater.git", - "reference": "fc70ff8ad8e68db921914106e5f4b56557358dfb" + "reference": "c520b71d9e836932e67bae7177b9a8bc49dda032" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Kanti/hub-updater/zipball/fc70ff8ad8e68db921914106e5f4b56557358dfb", - "reference": "fc70ff8ad8e68db921914106e5f4b56557358dfb", + "url": "https://api.github.com/repos/Kanti/hub-updater/zipball/c520b71d9e836932e67bae7177b9a8bc49dda032", + "reference": "c520b71d9e836932e67bae7177b9a8bc49dda032", "shasum": "" }, "require": { @@ -29,7 +29,7 @@ "Kanti\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0" ], @@ -42,7 +42,7 @@ } ], "description": "Simple Github Updater for Web Projects", - "time": "2014-11-11 07:32:09" + "time": "2014-12-12 17:28:13" }, { "name": "michelf/php-markdown", @@ -50,12 +50,12 @@ "source": { "type": "git", "url": "https://github.com/michelf/php-markdown.git", - "reference": "a8c56ecd5e9e7c7d37d00c814c864c3bc8b32694" + "reference": "1b5a30e13974b490964a1610bab5958e83cd4b69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/a8c56ecd5e9e7c7d37d00c814c864c3bc8b32694", - "reference": "a8c56ecd5e9e7c7d37d00c814c864c3bc8b32694", + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/1b5a30e13974b490964a1610bab5958e83cd4b69", + "reference": "1b5a30e13974b490964a1610bab5958e83cd4b69", "shasum": "" }, "require": { @@ -93,7 +93,7 @@ "keywords": [ "markdown" ], - "time": "2014-08-10 19:25:52" + "time": "2014-12-08 02:09:55" }, { "name": "suin/php-rss-writer", diff --git a/system/vendor/autoload.php b/system/vendor/autoload.php index 98986fb..2dd86a2 100644 --- a/system/vendor/autoload.php +++ b/system/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit7e07e0003c5d2fa2d68432f4e5afb068::getLoader(); +return ComposerAutoloaderInit4e8efbd787f4b484a9c0ae0966c85f83::getLoader(); diff --git a/system/vendor/composer/autoload_classmap.php b/system/vendor/composer/autoload_classmap.php index 5f6b757..48954d2 100644 --- a/system/vendor/composer/autoload_classmap.php +++ b/system/vendor/composer/autoload_classmap.php @@ -7,6 +7,7 @@ $baseDir = dirname(dirname($vendorDir)); return array( 'Kanti\\CacheOneFile' => $vendorDir . '/kanti/hub-updater/CacheOneFile.php', + 'Kanti\\HelperClass' => $vendorDir . '/kanti/hub-updater/HelperClass.php', 'Kanti\\HubUpdater' => $vendorDir . '/kanti/hub-updater/HubUpdater.php', 'Michelf\\Markdown' => $vendorDir . '/michelf/php-markdown/Michelf/Markdown.php', 'Michelf\\MarkdownExtra' => $vendorDir . '/michelf/php-markdown/Michelf/MarkdownExtra.php', diff --git a/system/vendor/composer/autoload_real.php b/system/vendor/composer/autoload_real.php index 2952a59..a3f15bf 100644 --- a/system/vendor/composer/autoload_real.php +++ b/system/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit7e07e0003c5d2fa2d68432f4e5afb068 +class ComposerAutoloaderInit4e8efbd787f4b484a9c0ae0966c85f83 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInit7e07e0003c5d2fa2d68432f4e5afb068 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit7e07e0003c5d2fa2d68432f4e5afb068', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit4e8efbd787f4b484a9c0ae0966c85f83', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit7e07e0003c5d2fa2d68432f4e5afb068', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit4e8efbd787f4b484a9c0ae0966c85f83', 'loadClassLoader')); $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -42,14 +42,14 @@ class ComposerAutoloaderInit7e07e0003c5d2fa2d68432f4e5afb068 $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $file) { - composerRequire7e07e0003c5d2fa2d68432f4e5afb068($file); + composerRequire4e8efbd787f4b484a9c0ae0966c85f83($file); } return $loader; } } -function composerRequire7e07e0003c5d2fa2d68432f4e5afb068($file) +function composerRequire4e8efbd787f4b484a9c0ae0966c85f83($file) { require $file; } diff --git a/system/vendor/composer/installed.json b/system/vendor/composer/installed.json index 2fa832e..2c6fc78 100644 --- a/system/vendor/composer/installed.json +++ b/system/vendor/composer/installed.json @@ -6,25 +6,25 @@ "source": { "type": "git", "url": "https://github.com/michelf/php-markdown.git", - "reference": "a8c56ecd5e9e7c7d37d00c814c864c3bc8b32694" + "reference": "1b5a30e13974b490964a1610bab5958e83cd4b69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/a8c56ecd5e9e7c7d37d00c814c864c3bc8b32694", - "reference": "a8c56ecd5e9e7c7d37d00c814c864c3bc8b32694", + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/1b5a30e13974b490964a1610bab5958e83cd4b69", + "reference": "1b5a30e13974b490964a1610bab5958e83cd4b69", "shasum": "" }, "require": { "php": ">=5.3.0" }, - "time": "2014-08-10 19:25:52", + "time": "2014-12-08 02:09:55", "type": "library", "extra": { "branch-alias": { "dev-lib": "1.4.x-dev" } }, - "installation-source": "dist", + "installation-source": "source", "autoload": { "psr-0": { "Michelf": "" @@ -101,23 +101,23 @@ }, { "name": "kanti/hub-updater", - "version": "0.1", - "version_normalized": "0.1.0.0", + "version": "v0.3.0", + "version_normalized": "0.3.0.0", "source": { "type": "git", "url": "https://github.com/Kanti/hub-updater.git", - "reference": "fc70ff8ad8e68db921914106e5f4b56557358dfb" + "reference": "c520b71d9e836932e67bae7177b9a8bc49dda032" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Kanti/hub-updater/zipball/fc70ff8ad8e68db921914106e5f4b56557358dfb", - "reference": "fc70ff8ad8e68db921914106e5f4b56557358dfb", + "url": "https://api.github.com/repos/Kanti/hub-updater/zipball/c520b71d9e836932e67bae7177b9a8bc49dda032", + "reference": "c520b71d9e836932e67bae7177b9a8bc49dda032", "shasum": "" }, "require": { "php": ">=5.3.0" }, - "time": "2014-11-11 07:32:09", + "time": "2014-12-12 17:28:13", "type": "library", "installation-source": "source", "autoload": { @@ -125,7 +125,7 @@ "Kanti\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0" ], diff --git a/system/vendor/michelf/php-markdown/Michelf/Markdown.php b/system/vendor/michelf/php-markdown/Michelf/Markdown.php index c5245fd..c8ced89 100644 --- a/system/vendor/michelf/php-markdown/Michelf/Markdown.php +++ b/system/vendor/michelf/php-markdown/Michelf/Markdown.php @@ -1678,9 +1678,9 @@ abstract class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { ### Extra Attribute Parser ### # Expression to use to catch attributes (includes the braces) - protected $id_class_attr_catch_re = '\{((?:[ ]*[#.][-_:a-zA-Z0-9]+){1,})[ ]*\}'; + protected $id_class_attr_catch_re = '\{((?:[ ]*[#.a-z][-_:a-zA-Z0-9=]+){1,})[ ]*\}'; # Expression to use when parsing in a context when no capture is desired - protected $id_class_attr_nocatch_re = '\{(?:[ ]*[#.][-_:a-zA-Z0-9]+){1,}[ ]*\}'; + protected $id_class_attr_nocatch_re = '\{(?:[ ]*[#.a-z][-_:a-zA-Z0-9=]+){1,}[ ]*\}'; protected function doExtraAttributes($tag_name, $attr) { # @@ -1692,17 +1692,21 @@ abstract class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { if (empty($attr)) return ""; # Split on components - preg_match_all('/[#.][-_:a-zA-Z0-9]+/', $attr, $matches); + preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr, $matches); $elements = $matches[0]; # handle classes and ids (only first id taken into account) $classes = array(); + $attributes = array(); $id = false; foreach ($elements as $element) { if ($element{0} == '.') { $classes[] = substr($element, 1); } else if ($element{0} == '#') { if ($id === false) $id = substr($element, 1); + } else if (strpos($element, '=') > 0) { + $parts = explode('=', $element, 2); + $attributes[] = $parts[0] . '="' . $parts[1] . '"'; } } @@ -1714,6 +1718,9 @@ abstract class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { if (!empty($classes)) { $attr_str .= ' class="'.implode(" ", $classes).'"'; } + if (!$this->no_markup && !empty($attributes)) { + $attr_str .= ' '.implode(" ", $attributes); + } return $attr_str; } diff --git a/system/vendor/michelf/php-markdown/Readme.md b/system/vendor/michelf/php-markdown/Readme.md index 0bccd69..80504c2 100644 --- a/system/vendor/michelf/php-markdown/Readme.md +++ b/system/vendor/michelf/php-markdown/Readme.md @@ -174,6 +174,16 @@ PHP Markdown, please visit [michelf.ca/donate] or send Bitcoin to Version History --------------- +Unreleased + +* Added the ability to insert custom HTML attributes everywhere an extra + attribute block is allowed (links, images, headers). Credits to + Peter Droogmans for providing the implementation. + +* Added a `url_filter_func` configuration variable which takes a function + that can rewrite any link or image URL to something different. + + PHP Markdown Lib 1.4.1 (4 May 2014) * The HTML block parser will now treat `
` as a block-level element