Skip to content

Commit f22c83a

Browse files
author
bkraul
committed
Merge branch 'master-2.0.x' of github.com:bkraul/BBCodePlus into feat-2.0.x-newparser
2 parents 22d5307 + c8c20fb commit f22c83a

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

BBCodePlus/BBCodePlus.php

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

2727
$this->requires['MantisCore'] = '2.0.0';
2828
# this plugin can coexist with MantisCoreFormatting.
@@ -376,16 +376,16 @@ function string_process_bbcode( $p_string, $p_multiline = TRUE ) {
376376
377377
# code=lang
378378
$p_string = preg_replace_callback('/\[code=(\w+)\](.+)\[\/code\]/imsU',
379-
create_function('$m', '
379+
function ($m) {
380380
return "<pre><code class=\"language-" . strtolower($m[1]) . "\">" . $m[2] . "</code></pre>";
381-
')
381+
}
382382
, $p_string);
383383
384384
# code=lang start=n
385385
$p_string = preg_replace_callback('/\[code=(\w+)\ start=([0-9]+)\](.+)\[\/code\]/imsU',
386-
create_function('$m', '
386+
function ($m) {
387387
return "<pre class=\"line-numbers\" data-start=\"" . $m[2] . "\"><code class=\"language-" . strtolower($m[1]) . "\">" . $m[3] . "</code></pre>";
388-
')
388+
}
389389
, $p_string);
390390
391391
# process quotes.
@@ -498,16 +498,16 @@ function string_strip_bbcode( $p_string, $p_multiline = TRUE ) {
498498

499499
# code=lang
500500
$p_string = preg_replace_callback('/\[code=(\w+)\](.+)\[\/code\]/imsU',
501-
create_function('$m', '
501+
function ($m) {
502502
return $m[2];
503-
')
503+
}
504504
, $p_string);
505505

506506
# code=lang start=n
507507
$p_string = preg_replace_callback('/\[code=(\w+)\ start=([0-9]+)\](.+)\[\/code\]/imsU',
508-
create_function('$m', '
508+
function ($m) {
509509
return $m[3];
510-
')
510+
}
511511
, $p_string);
512512

513513
# process quotes.
@@ -544,9 +544,9 @@ function restore_pre_code_tags( $p_string, $p_multiline = true ) {
544544
$tags = implode( '|', $tags );
545545

546546
$t_string = preg_replace_callback('/&lt;(' . $tags . ')(.*?)&gt;/ui',
547-
create_function('$m', '
547+
function($m) {
548548
return "<" . $m[1] . str_replace("&quot;", "\"", $m[2]) . ">";
549-
')
549+
}
550550
, $t_string);
551551

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

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
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

1010
* Editor with toolbars and preview (using [jQuery MarkItUp](http://markitup.jaysalvat.com/home/)).
1111
* BBCode processing.
1212
* Syntax Highlighting (using [prismjs](http://prismjs.com/)).
1313

14-
Screenshots:
14+
## Contributing to BBCodePlus
15+
16+
If you would like to contribute to BBCode plus, please [read this first](https://github.com/mantisbt-plugins/BBCodePlus/wiki/Contributing-to-BBCodePlus).
17+
18+
## Screenshots:
1519

1620
![Markup editor](https://raw.githubusercontent.com/mantisbt-plugins/BBCodePlus/master/Screen1.png)
1721

@@ -53,4 +57,5 @@ Supported BBCode Tags
5357
[code start=3][/code] - Code block with line numbers starting at number.
5458
[quote][/quote] - Quote by *someone* (no name).
5559
[quote=name][/quote] - Quote by *name*.
56-
```
60+
```
61+

0 commit comments

Comments
 (0)