Skip to content

Commit

Permalink
[code] bug
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Sep 24, 2017
1 parent a5926a5 commit 363c59f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/post.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ private static function parse_content($c){

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

// Add code definiton
$parser->addCodeDefinition(new class extends \JBBCode\CodeDefinition {
Expand Down
4 changes: 2 additions & 2 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ highlight = true
;styles[] = static/styles/custom2.css
;scripts = static/styles/scripts.css

bbtags[quote] = "<quote>{param}</quote>"
;bbtags[quote] = "<quote>{param}</quote>"

[login]
force_login = true
Expand All @@ -32,6 +32,6 @@ pass = demo

[system]
system_name = blog
version = 1.041
version = 1.05
debug = true
logs = false

0 comments on commit 363c59f

Please sign in to comment.