improve TextFormatter: remove whitespaces between table-tags
This commit is contained in:
parent
e888e0ac25
commit
e9016bc014
1 changed files with 4 additions and 0 deletions
|
|
@ -65,6 +65,10 @@
|
|||
$string = str_replace('[/strong]', '</strong>', $string);
|
||||
|
||||
// Create tables
|
||||
$string = preg_replace('/(\[table\])\s+/u', '$1', $string);
|
||||
$string = preg_replace('/\s*(\[tr\])\s*/u', '$1', $string);
|
||||
$string = preg_replace('%\s+(\[/table\])%u', '$1', $string);
|
||||
$string = preg_replace('%\s*(\[/tr\])\s*%u', '$1', $string);
|
||||
$string = str_replace('[table]', '</p><table>', $string);
|
||||
$string = str_replace('[/table]', '</table><p>', $string);
|
||||
$string = str_replace('[tr]', '<tr>', $string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue