aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/src/Configuration.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-11-05 09:55:23 +0100
committerMario Vavti <mario@mariovavti.com>2018-11-05 09:55:23 +0100
commit4830a1559d5ad9f59d809bf3d693592d3f7c8ab2 (patch)
treedb87b400af1f3de1ca01bccef58b0bf4e55b1241 /vendor/league/html-to-markdown/src/Configuration.php
parentc8dd516d6c743d0371dc2ccb476eb70bcc17fa0a (diff)
parent92ea3ef72036c39601b69565f3e03fa44ad9aef7 (diff)
downloadvolse-hubzilla-4830a1559d5ad9f59d809bf3d693592d3f7c8ab2.tar.gz
volse-hubzilla-4830a1559d5ad9f59d809bf3d693592d3f7c8ab2.tar.bz2
volse-hubzilla-4830a1559d5ad9f59d809bf3d693592d3f7c8ab2.zip
Merge branch 'dev'
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);
+ }
+ }
+ }
}