Skip to content

Commit d39c08f

Browse files
authored
Merge pull request #37 from bkraul/develop-2.0.x
Addressed regression introduced by ISS merge.
2 parents 6dcb3fb + af21480 commit d39c08f

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

BBCodePlus/BBCodePlus.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function register() {
1919
$this->name = plugin_lang_get( 'title' );
2020
$this->description = plugin_lang_get( 'description' );
2121
$this->page = 'config';
22-
$this->version = '2.0.17';
22+
$this->version = '2.0.18';
2323

2424
$this->requires['MantisCore'] = '2.0.0';
2525
# this plugin can coexist with MantisCoreFormatting.
@@ -314,16 +314,16 @@ function string_process_bbcode( $p_string, $p_multiline = TRUE ) {
314314

315315
# code=lang
316316
$p_string = preg_replace_callback('/\[code=(\w+)\](.+)\[\/code\]/imsU',
317-
create_function('$m', '
317+
function ($m) {
318318
return "<pre><code class=\"language-" . strtolower($m[1]) . "\">" . $m[2] . "</code></pre>";
319-
')
319+
}
320320
, $p_string);
321321

322322
# code=lang start=n
323323
$p_string = preg_replace_callback('/\[code=(\w+)\ start=([0-9]+)\](.+)\[\/code\]/imsU',
324-
create_function('$m', '
324+
function ($m) {
325325
return "<pre class=\"line-numbers\" data-start=\"" . $m[2] . "\"><code class=\"language-" . strtolower($m[1]) . "\">" . $m[3] . "</code></pre>";
326-
')
326+
}
327327
, $p_string);
328328

329329
# process quotes.
@@ -436,16 +436,16 @@ function string_strip_bbcode( $p_string, $p_multiline = TRUE ) {
436436

437437
# code=lang
438438
$p_string = preg_replace_callback('/\[code=(\w+)\](.+)\[\/code\]/imsU',
439-
create_function('$m', '
439+
function ($m) {
440440
return $m[2];
441-
')
441+
}
442442
, $p_string);
443443

444444
# code=lang start=n
445445
$p_string = preg_replace_callback('/\[code=(\w+)\ start=([0-9]+)\](.+)\[\/code\]/imsU',
446-
create_function('$m', '
446+
function ($m) {
447447
return $m[3];
448-
')
448+
}
449449
, $p_string);
450450

451451
# process quotes.
@@ -482,9 +482,9 @@ function restore_pre_code_tags( $p_string, $p_multiline = true ) {
482482
$tags = implode( '|', $tags );
483483

484484
$t_string = preg_replace_callback('/&lt;(' . $tags . ')(.*?)&gt;/ui',
485-
create_function('$m', '
485+
function($m) {
486486
return "<" . $m[1] . str_replace("&quot;", "\"", $m[2]) . ">";
487-
')
487+
}
488488
, $t_string);
489489

490490
$t_string = preg_replace( '/&lt;\/(' . $tags . ')\s*&gt;/ui', '</\\1>', $t_string );

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
BBCodePlus
22
=============
3-
BBCode plugin for Mantis BugTracker 2.0
3+
BBCode plugin for Mantis BugTracker 2.x
44

5-
* See [1.2.x branch](https://github.com/mantisbt-plugins/BBCodePlus/tree/master-1.2.x) for the Mantis 1.2 version.
6-
* See [BBCodePlus](https://github.com/mantisbt-plugins/BBCodePlus) for the Mantis 1.3 version.
5+
* See branch [master-1.2.x](https://github.com/mantisbt-plugins/BBCodePlus/tree/master-1.2.x) for the Mantis 1.2 version.
6+
* See [master](https://github.com/mantisbt-plugins/BBCodePlus) for the Mantis 1.3 version.
77

88
Incorporates the following configurable features:
99

@@ -53,4 +53,8 @@ Supported BBCode Tags
5353
[code start=3][/code] - Code block with line numbers starting at number.
5454
[quote][/quote] - Quote by *someone* (no name).
5555
[quote=name][/quote] - Quote by *name*.
56-
```
56+
```
57+
## Contributing to BBCodePlus
58+
59+
If you would like to contribute to BBCode plus, please [read this first](https://github.com/mantisbt-plugins/BBCodePlus/wiki/Contributing-to-BBCodePlus).
60+

0 commit comments

Comments
 (0)