mirror of
https://github.com/friendica/friendica
synced 2024-11-10 19:42:54 +00:00
Added spaces
This commit is contained in:
parent
2a28591415
commit
f127d65de9
1 changed files with 8 additions and 8 deletions
|
@ -90,10 +90,10 @@ function html2bbcode($message, $basepath = '')
|
||||||
function ($matches) use (&$codeblocks) {
|
function ($matches) use (&$codeblocks) {
|
||||||
$return = '[codeblock-' . count($codeblocks) . ']';
|
$return = '[codeblock-' . count($codeblocks) . ']';
|
||||||
|
|
||||||
$prefix = '[code]';
|
$prefix = '[code]';
|
||||||
if ($matches[1] != '') {
|
if ($matches[1] != '') {
|
||||||
$prefix = '[code=' . $matches[1] . ']';
|
$prefix = '[code=' . $matches[1] . ']';
|
||||||
}
|
}
|
||||||
$codeblocks[] = $prefix . $matches[2] . '[/code]';
|
$codeblocks[] = $prefix . $matches[2] . '[/code]';
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
@ -313,10 +313,10 @@ function html2bbcode($message, $basepath = '')
|
||||||
// Restore code blocks
|
// Restore code blocks
|
||||||
$message = preg_replace_callback('#\[codeblock-([0-9]+)\]#iU',
|
$message = preg_replace_callback('#\[codeblock-([0-9]+)\]#iU',
|
||||||
function ($matches) use ($codeblocks) {
|
function ($matches) use ($codeblocks) {
|
||||||
$return = '';
|
$return = '';
|
||||||
if (isset($codeblocks[intval($matches[1])])) {
|
if (isset($codeblocks[intval($matches[1])])) {
|
||||||
$return = $codeblocks[$matches[1]];
|
$return = $codeblocks[$matches[1]];
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
, $message);
|
, $message);
|
||||||
|
|
Loading…
Reference in a new issue