diff options
author | friendica <info@friendica.com> | 2015-01-14 18:37:28 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-14 18:37:28 -0800 |
commit | 2e89c13229739e41c6405e9124a16a9d2ada3cfb (patch) | |
tree | 26b9363e61bbe63b7a1af5860f5fb6f08acca080 /include | |
parent | 168b67fa41b74a23a321e184cd8988644ec55dce (diff) | |
parent | b37915a40e4e049072698e604e61798445a339de (diff) | |
download | volse-hubzilla-2e89c13229739e41c6405e9124a16a9d2ada3cfb.tar.gz volse-hubzilla-2e89c13229739e41c6405e9124a16a9d2ada3cfb.tar.bz2 volse-hubzilla-2e89c13229739e41c6405e9124a16a9d2ada3cfb.zip |
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'include')
-rw-r--r-- | include/bbcode.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 030a1fb49..33017c011 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -575,6 +575,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { if (strpos($Text,'[h6]') !== false) { $Text = preg_replace("(\[h6\](.*?)\[\/h6\])ism",'<h6>$1</h6>',$Text); } + // Check for table of content + if (strpos($Text,'[toc]') !== false) { + $Text = preg_replace("/\[toc\]/ism",'<ul id="toc"></ul>',$Text); + } // Check for centered text if (strpos($Text,'[/center]') !== false) { $Text = preg_replace("(\[center\](.*?)\[\/center\])ism","<div style=\"text-align:center;\">$1</div>",$Text); |