FIX list of module not complete when module mb_strlen not available
This commit is contained in:
parent
88841ccbae
commit
bdecef56f9
@ -128,3 +128,18 @@ Change also file Luracast/Restler/explorer/index.html
|
|||||||
// @CHANGE LDR
|
// @CHANGE LDR
|
||||||
if (! is_string($className)) return;
|
if (! is_string($className)) return;
|
||||||
//var_dump($className);
|
//var_dump($className);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PARSEDOWN
|
||||||
|
---------
|
||||||
|
|
||||||
|
* Fix to avoid fatal error when mb_strlen not available:
|
||||||
|
|
||||||
|
// @CHANGE LDR Fix when mb_strlen is not available
|
||||||
|
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
||||||
|
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
|
||||||
|
else $len = strlen($line);
|
||||||
|
$shortage = 4 - $len % 4;
|
||||||
|
|
||||||
|
|
||||||
@ -141,7 +141,11 @@ class Parsedown
|
|||||||
|
|
||||||
foreach ($parts as $part)
|
foreach ($parts as $part)
|
||||||
{
|
{
|
||||||
$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
// @CHANGE LDR Fix when mb_strlen is not available
|
||||||
|
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
||||||
|
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
|
||||||
|
else $len = strlen($line);
|
||||||
|
$shortage = 4 - $len % 4;
|
||||||
|
|
||||||
$line .= str_repeat(' ', $shortage);
|
$line .= str_repeat(' ', $shortage);
|
||||||
$line .= $part;
|
$line .= $part;
|
||||||
@ -515,10 +519,10 @@ class Parsedown
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
if($name === 'ol')
|
if($name === 'ol')
|
||||||
{
|
{
|
||||||
$listStart = stristr($matches[0], '.', true);
|
$listStart = stristr($matches[0], '.', true);
|
||||||
|
|
||||||
if($listStart !== '1')
|
if($listStart !== '1')
|
||||||
{
|
{
|
||||||
$Block['element']['attributes'] = array('start' => $listStart);
|
$Block['element']['attributes'] = array('start' => $listStart);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user