I can’t get my head around this and I could really use some help.
I want to replace text like this
[list]line 0
line 1
line 2
[/list]
with
<ul><li>line 0</li>
<li>line 1</li>
<li>line 2</li>
</ul>
It can appear several times in the string and it would be great if it can avoid adding empty list elements.
Here is my special BBParser. Spent ages on it.
http://pastebin.com/3MRYRd8k
Use it like this: