aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/src/Configuration.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-10-30 12:12:07 +0100
committerMario Vavti <mario@mariovavti.com>2018-10-30 12:12:07 +0100
commit2192ea6fdf21a00ccf44d626a01b756d194d6cbe (patch)
tree153d4b4ffb2bf40edf8aae66b82a274dac37c208 /vendor/league/html-to-markdown/src/Configuration.php
parent0f19627407ccd373afe1ce2d2347ea240f3195c1 (diff)
downloadvolse-hubzilla-2192ea6fdf21a00ccf44d626a01b756d194d6cbe.tar.gz
volse-hubzilla-2192ea6fdf21a00ccf44d626a01b756d194d6cbe.tar.bz2
volse-hubzilla-2192ea6fdf21a00ccf44d626a01b756d194d6cbe.zip
update html_to_markdown, smarty and sabredav libs via composer
Diffstat (limited to 'vendor/league/html-to-markdown/src/Configuration.php')
-rw-r--r--vendor/league/html-to-markdown/src/Configuration.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/league/html-to-markdown/src/Configuration.php b/vendor/league/html-to-markdown/src/Configuration.php
index 2943383aa..5bc8d5503 100644
--- a/vendor/league/html-to-markdown/src/Configuration.php
+++ b/vendor/league/html-to-markdown/src/Configuration.php
@@ -12,6 +12,8 @@ class Configuration
public function __construct(array $config = array())
{
$this->config = $config;
+
+ $this->checkForDeprecatedOptions($config);
}
/**
@@ -19,6 +21,7 @@ class Configuration
*/
public function merge(array $config = array())
{
+ $this->checkForDeprecatedOptions($config);
$this->config = array_replace_recursive($this->config, $config);
}
@@ -27,6 +30,7 @@ class Configuration
*/
public function replace(array $config = array())
{
+ $this->checkForDeprecatedOptions($config);
$this->config = $config;
}
@@ -36,6 +40,7 @@ class Configuration
*/
public function setOption($key, $value)
{
+ $this->checkForDeprecatedOptions(array($key => $value));
$this->config[$key] = $value;
}
@@ -57,4 +62,15 @@ class Configuration
return $this->config[$key];
}
+
+ private function checkForDeprecatedOptions(array $config)
+ {
+ foreach ($config as $key => $value) {
+ if ($key === 'bold_style' && $value !== '**') {
+ @trigger_error('Customizing the bold_style option is deprecated and may be removed in the next major version', E_USER_DEPRECATED);
+ } elseif ($key === 'italic_style' && $value !== '*') {
+ @trigger_error('Customizing the italic_style option is deprecated and may be removed in the next major version', E_USER_DEPRECATED);
+ }
+ }
+ }
}