mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 10:20:45 +02:00
Added [code=inline] for single line <code>.
This commit is contained in:
@@ -47,9 +47,18 @@ if(isset($pref['useGeshi']) && $pref['useGeshi'] && file_exists(e_PLUGIN."geshi/
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$code_text = html_entity_decode($code_text, ENT_QUOTES, 'utf-8');
|
$code_text = html_entity_decode($code_text, ENT_QUOTES, 'utf-8');
|
||||||
$code_text = trim($code_text);
|
$code_text = trim($code_text);
|
||||||
$code_text = htmlspecialchars($code_text, ENT_QUOTES, 'utf-8').'</pre>';
|
$code_text = htmlspecialchars($code_text, ENT_QUOTES, 'utf-8').'</pre>';
|
||||||
|
|
||||||
|
if($parm == 'inline')
|
||||||
|
{
|
||||||
|
return "<code style='unicode-bidi: embed; direction: ltr'>".$code_text."</code>";
|
||||||
|
}
|
||||||
|
|
||||||
// $highlighted_text = highlight_string($code_text, TRUE);
|
// $highlighted_text = highlight_string($code_text, TRUE);
|
||||||
// highlighted_text = str_replace(array("<code>","</code>"),"",$highlighted_text);
|
// highlighted_text = str_replace(array("<code>","</code>"),"",$highlighted_text);
|
||||||
$divClass = ($parm) ? $parm : 'code_highlight';
|
$divClass = ($parm) ? $parm : 'code_highlight';
|
||||||
|
@@ -39,7 +39,8 @@ class bbcode_shortcodes extends e_shortcode
|
|||||||
6 => array('[h=5][/h]','Heading 6'),
|
6 => array('[h=5][/h]','Heading 6'),
|
||||||
7 => array('[block][/block]','Block'),
|
7 => array('[block][/block]','Block'),
|
||||||
8 => array('[blockquote][/blockquote]', 'Quote'),
|
8 => array('[blockquote][/blockquote]', 'Quote'),
|
||||||
9 => array('[code][/code]', 'Code')
|
9 => array('[code][/code]', 'Code Block'),
|
||||||
|
10 => array('[code=inline][/code]', 'Code Inline')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user