Skip to content

Commit 363c59f

Browse files
committed
[code] bug
1 parent a5926a5 commit 363c59f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

app/post.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ private static function parse_content($c){
1616

1717
if(Config::get("highlight")){
1818
$c = str_replace("\t", " ", $c);
19-
$c = preg_replace("/\[(\/?)code(=(?:[^\[]+))?\]\s*?(?:\n|\r)?/i", '[$1code$2]', $c);
19+
$c = preg_replace("/\[code(?:=([^\[]+))?\]\s*?(?:\n|\r)?/i", '[code=$1]', $c);
20+
$c = preg_replace("/\[\/code\]\s*?(?:\n|\r)?/i", '[/code]', $c);
2021

2122
// Add code definiton
2223
$parser->addCodeDefinition(new class extends \JBBCode\CodeDefinition {

config.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ highlight = true
2323
;styles[] = static/styles/custom2.css
2424
;scripts = static/styles/scripts.css
2525

26-
bbtags[quote] = "<quote>{param}</quote>"
26+
;bbtags[quote] = "<quote>{param}</quote>"
2727

2828
[login]
2929
force_login = true
@@ -32,6 +32,6 @@ pass = demo
3232

3333
[system]
3434
system_name = blog
35-
version = 1.041
35+
version = 1.05
3636
debug = true
3737
logs = false

0 commit comments

Comments
 (0)