Skip to content

Commit abd58f0

Browse files
author
bkraul
committed
Merge branch 'master' into develop
2 parents a40e6d1 + 3473081 commit abd58f0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

BBCodePlus/BBCodePlus.php

Lines changed: 4 additions & 4 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.1.9';
25+
$this->version = '2.1.10';
2626

2727
$this->requires['MantisCore'] = '2.0.0';
2828
# this plugin can coexist with MantisCoreFormatting.
@@ -273,12 +273,12 @@ function add_tags() {
273273
$this->t_bbCode->addParser('table-body', '/\[tbody\](.*?)\[\/tbody\]/s', '<tbody>$1</tbody>', '$1');
274274
$this->t_bbCode->addParser('table-head-data', '/\[th\](.*?)\[\/th\]/s', '<th>$1</th>', '$1');
275275
$this->t_bbCode->addParser('code', '/\[code\](.*?)\[\/code\]/s', '<pre class="bbcodeplus pre"><code class="bbcodeplus code language-none">$1</code></pre>', '$1');
276-
$this->t_bbCode->addParser('code-lang', '/\[code=(\w+)\](.*?)\[\/code\]/s', '<pre class="bbcodeplus pre"><code class="bbcodeplus code language-$1">$2</code></pre>','$2');
276+
$this->t_bbCode->addParser('code-lang', '/\[code=(\w*)\](.*?)\[\/code\]/s', '<pre class="bbcodeplus pre"><code class="bbcodeplus code language-$1">$2</code></pre>','$2');
277277
$this->t_bbCode->addParser('code-ln', '/\[code start=([0-9]+)\](.*?)\[\/code\]/s', '<pre class="bbcodeplus pre line-numbers" data-start="$1"><code class="language-none">$2</code></pre>', '$3');
278-
$this->t_bbCode->addParser('code-lang-ln', '/\[code=(\w+)\ start=([0-9]+)\](.*?)\[\/code\]/s',
278+
$this->t_bbCode->addParser('code-lang-ln', '/\[code=(\w*)\ start=([0-9]+)\](.*?)\[\/code\]/s',
279279
'<pre class="bbcodeplus pre line-numbers" data-start="$2"><code class="bbcodeplus code language-$1">$3</code></pre>', '$3');
280280
$this->t_bbCode->addParser('quote', '/\[quote\](.*?)\[\/quote\]/s', '<blockquote class="bbcodeplus blockquote">$1</blockquote>', '$1');
281-
$this->t_bbCode->addParser('named-quote', '/\[quote=(\w+)\](.*?)\[\/quote\]/s',
281+
$this->t_bbCode->addParser('named-quote', '/\[quote=([\s\w]*)\](.*?)\[\/quote\]/s',
282282
'<blockquote class="bbcodeplus blockquote"><p class="mb-0">$2</p><footer class="bbcodeblus blockquote-footer"><cite title="$1">$1</cite></footer></blockquote>',
283283
'$1 wrote: $2');
284284
}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ If you would like to contribute to BBCode plus, please [read this guide first](h
2626

2727
## Change Log
2828

29+
### 2.1.10
30+
31+
- Fixed rendering issue of code blocks when language parameter was left empty
32+
- Fixed rendering issue of quote blocks when quotee parameter contained whitespaces
33+
2934
### 2.1.9
3035

3136
- Fixed display issue of loose links (thanks to [@FSD-Christian-ISS](https://github.com/FSD-Christian-ISS) )

0 commit comments

Comments
 (0)