Upgrade to 3.6.3
This commit is contained in:
@@ -17,7 +17,7 @@ class ParsedownExtra extends Parsedown
|
||||
{
|
||||
# ~
|
||||
|
||||
const version = '0.8.0-beta-1';
|
||||
public const version = '0.8.0-beta-1';
|
||||
|
||||
# ~
|
||||
|
||||
@@ -568,11 +568,11 @@ class ParsedownExtra extends Parsedown
|
||||
# http://stackoverflow.com/q/1148928/200145
|
||||
libxml_use_internal_errors(true);
|
||||
|
||||
$DOMDocument = new DOMDocument;
|
||||
$DOMDocument = new DOMDocument();
|
||||
|
||||
# http://stackoverflow.com/q/11309194/200145
|
||||
$elementMarkup = mb_convert_encoding($elementMarkup, 'HTML-ENTITIES', 'UTF-8');
|
||||
|
||||
|
||||
# Ensure that saveHTML() is not remove new line characters. New lines will be split by this character.
|
||||
$DOMDocument->formatOutput = true;
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class Parsedown
|
||||
{
|
||||
# ~
|
||||
|
||||
const version = '1.8.0-beta-7';
|
||||
public const version = '1.8.0-beta-7';
|
||||
|
||||
# ~
|
||||
|
||||
@@ -207,11 +207,9 @@ class Parsedown
|
||||
$CurrentBlock = $Block;
|
||||
|
||||
continue;
|
||||
} else {
|
||||
if ($this->isBlockCompletable($CurrentBlock['type'])) {
|
||||
$methodName = 'block' . $CurrentBlock['type'] . 'Complete';
|
||||
$CurrentBlock = $this->$methodName($CurrentBlock);
|
||||
}
|
||||
} elseif ($this->isBlockCompletable($CurrentBlock['type'])) {
|
||||
$methodName = 'block' . $CurrentBlock['type'] . 'Complete';
|
||||
$CurrentBlock = $this->$methodName($CurrentBlock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1597,12 +1595,10 @@ class Parsedown
|
||||
$markup .= $this->elements($Element['elements']);
|
||||
} elseif (isset($Element['element'])) {
|
||||
$markup .= $this->element($Element['element']);
|
||||
} elseif (!$permitRawHtml) {
|
||||
$markup .= self::escape($text, true);
|
||||
} else {
|
||||
if (!$permitRawHtml) {
|
||||
$markup .= self::escape($text, true);
|
||||
} else {
|
||||
$markup .= $text;
|
||||
}
|
||||
$markup .= $text;
|
||||
}
|
||||
|
||||
$markup .= $hasName ? '</' . $Element['name'] . '>' : '';
|
||||
|
@@ -19,7 +19,7 @@ class Spyc
|
||||
{
|
||||
// SETTINGS
|
||||
|
||||
const REMPTY = "\0\0\0\0\0";
|
||||
public const REMPTY = "\0\0\0\0\0";
|
||||
|
||||
/**
|
||||
* Setting this to true will force YAMLDump to enclose any string value in
|
||||
@@ -106,7 +106,7 @@ class Spyc
|
||||
*/
|
||||
public static function YAMLLoad($input, $options = [])
|
||||
{
|
||||
$Spyc = new Spyc;
|
||||
$Spyc = new Spyc();
|
||||
foreach ($options as $key => $value) {
|
||||
if (property_exists($Spyc, $key)) {
|
||||
$Spyc->$key = $value;
|
||||
@@ -137,7 +137,7 @@ class Spyc
|
||||
*/
|
||||
public static function YAMLLoadString($input, $options = [])
|
||||
{
|
||||
$Spyc = new Spyc;
|
||||
$Spyc = new Spyc();
|
||||
foreach ($options as $key => $value) {
|
||||
if (property_exists($Spyc, $key)) {
|
||||
$Spyc->$key = $value;
|
||||
@@ -169,7 +169,7 @@ class Spyc
|
||||
*/
|
||||
public static function YAMLDump($array, $indent = false, $wordwrap = false, $no_opening_dashes = false)
|
||||
{
|
||||
$spyc = new Spyc;
|
||||
$spyc = new Spyc();
|
||||
return $spyc->dump($array, $indent, $wordwrap, $no_opening_dashes);
|
||||
}
|
||||
|
||||
@@ -448,9 +448,9 @@ class Spyc
|
||||
{
|
||||
if (self::isTrueWord($value)) {
|
||||
$value = true;
|
||||
} else if (self::isFalseWord($value)) {
|
||||
} elseif (self::isFalseWord($value)) {
|
||||
$value = false;
|
||||
} else if (self::isNullWord($value)) {
|
||||
} elseif (self::isNullWord($value)) {
|
||||
$value = null;
|
||||
}
|
||||
}
|
||||
@@ -912,20 +912,18 @@ class Spyc
|
||||
}
|
||||
|
||||
$_arr = array_merge($_arr, $value);
|
||||
} else if ($key || $key === '' || $key === '0') {
|
||||
} elseif ($key || $key === '' || $key === '0') {
|
||||
if (!is_array($_arr))
|
||||
$_arr = array($key => $value);
|
||||
else
|
||||
$_arr[$key] = $value;
|
||||
} elseif (!is_array($_arr)) {
|
||||
$_arr = array($value);
|
||||
$key = 0;
|
||||
} else {
|
||||
if (!is_array($_arr)) {
|
||||
$_arr = array($value);
|
||||
$key = 0;
|
||||
} else {
|
||||
$_arr[] = $value;
|
||||
end($_arr);
|
||||
$key = key($_arr);
|
||||
}
|
||||
$_arr[] = $value;
|
||||
end($_arr);
|
||||
$key = key($_arr);
|
||||
}
|
||||
|
||||
$reverse_path = array_reverse($this->path);
|
||||
@@ -992,12 +990,12 @@ class Spyc
|
||||
return $literalBlock . $line;
|
||||
}
|
||||
|
||||
function revertLiteralPlaceHolder($lineArray, $literalBlock)
|
||||
public function revertLiteralPlaceHolder($lineArray, $literalBlock)
|
||||
{
|
||||
foreach ($lineArray as $k => $_) {
|
||||
if (is_array($_))
|
||||
$lineArray[$k] = $this->revertLiteralPlaceHolder($_, $literalBlock);
|
||||
else if (substr($_, -1 * strlen($this->LiteralPlaceHolder)) == $this->LiteralPlaceHolder)
|
||||
elseif (substr($_, -1 * strlen($this->LiteralPlaceHolder)) == $this->LiteralPlaceHolder)
|
||||
$lineArray[$k] = rtrim($literalBlock, " \r\n");
|
||||
}
|
||||
return $lineArray;
|
||||
|
Reference in New Issue
Block a user