fix a few issues with code blocks, ignore tags within blocks, fold multi-line blocks to one, also turn html br into two LFs.
This commit is contained in:
parent
1460fc0d71
commit
00d2b58358
4 changed files with 24 additions and 2 deletions
5
boot.php
5
boot.php
|
@ -1687,6 +1687,11 @@ function activity_match($haystack,$needle) {
|
|||
if(! function_exists('get_tags')) {
|
||||
function get_tags($s) {
|
||||
$ret = array();
|
||||
|
||||
// ignore anything in a code block
|
||||
|
||||
$s = preg_replace('/\[code\](.*?)\[\/code\]/sm','',$s);
|
||||
|
||||
if(preg_match_all('/([@#][^ \x0D\x0A,:?]*)([ \x0D\x0A,:?]|$)/',$s,$match)) {
|
||||
foreach($match[1] as $match) {
|
||||
if(strstr($match,"]")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue